dhatim / fastexcel

Generate and read big Excel files quickly
Other
677 stars 122 forks source link

Global default font with setGlobalDefaultFont is not working #285

Closed Drei-Jahoda closed 2 months ago

Drei-Jahoda commented 1 year ago

I am facing issue with setting default font name. Following example ignoring font name and also font size.

` org.dhatim.fastexcel.Workbook newWb = new org.dhatim.fastexcel.Workbook(fileOutputStream, "Test", "1.0"); Worksheet sheet = newWb.newWorksheet("test sheet");

newWb.setGlobalDefaultFont("Arial",20); // this is not working

sheet.value(0, 0, "should be arial but it is not"); sheet.value(0, 1, "arial with manual set"); sheet.style(0, 1).fontName("Arial").set();

newWb.finish();
`

Any suggestion?

meiMingle commented 1 year ago

I haven't been able to reproduce your problem, and the test results are normal here. But it should be pointed out that in the end you should use close() instead of finish()

Drei-Jahoda commented 1 year ago

ok, I have update. 2 issues:

Many thanks for double check it from your side in advance.

meiMingle commented 1 year ago

Thanks for the feedback, the source of the problem has been identified. I plan to work on this in my spare time, hopefully not too long.