How do I skip columns (include spacing in the middle of my data to make it readable) when writing a new sheet using Xcelite?
Is it possible to write two tables on the same sheet with the 2nd table below the 1st?
Is Xcelite even the right tool for me to be using? Most of the information that I was able to find on using Excel writing tools for Java is over a decade old. Xcelite is very easy to use but it doesn't seem very customizable and the only documentation I can find for it is their Github page and its light on details
@Column(name = " ")
private final String space = null;
getSheet and then proceed as normally and the 2nd table be written right next to it. To place the 2nd table below the 1st, you need to modify the XceliteOptions via the setHeaderRowIndex. This needs to be done after writing the 1st dataset and before writing the 2nd.
public void write2Tables(List<Data> firstList, List<Stat> secondList, String sheetName) {
Xcelite xcelite = new Xcelite()
xcelite.createSheet(sheetName).getBeanWriter(Data.class).write(firstList);
xcelite.write(outputFile)
XceliteOptions options = new XceliteOptions();
options.setHeaderRowIndex(firstList + 2); //single space between tables
xcelite.setOptions(options);
xcelite.getSheet(sheetName).getBeanWriter(Stat.class).write(secondList);
xcelite.write(outputFile)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With