Open Onekun opened 3 weeks ago
a) Does it really work with less columns? (<50)
b) Does it work without streaming?
c) withKeepTemplateSheet(KeepTemplateSheet.KEEP)
is a multi-sheet option. Do you really use dynamically created sheets? (Does it work without multi-sheet?)
d) Is it a bug since 2.14.0? Do you know if it works with an older JXLS version?
e) You could try to test it with branch master. Maybe #242 solves the problem??
f) Is Excel the right solution for such a formular? (maybe better JasperReports or fill-into-PDF?)
a) Yes, see attach file. Although the row height does not match the template, unfortunately.
Template bus6.xlsx Result bus6 test trim column.xlsx
Template template_esm2.xlsx Result esm2 ok.xlsx
b) To be honest, I even forgot whether I checked it or not. I'll check again.
c) Just used it to try to solve the problem on v3.0.0, it didn't help.
d) Initially I tried it on 2.10, because they had previously used it on another project, but there were no such cumbersome templates.
e) I'll definitely try it and report back afterwards.
f) It might be worth thinking about it, but initially all templates are in .xls or .xlsx. It's probably worth looking at JasperReports as well. However, I have no experience working with it. There is also a chance that users will need to manually complete the result, and it is unlikely that users will have Adobe Acrobat or internet access for the PDF.
Good day. I ran into a problem generating templates. My .xlsx template has a number of columns up to GG. jx:area(lastCell="GG56") The width of each column is 0.42. The height of the lines varies, but on average from 9.75 to 12.75. Moreover, if in one .xlsx sheet1 lastCell="GG56" and sheet2 lastCell="R26" - the result on sheet2 is correct. And the width remains normal.
I managed to fix the width problem using excelSheet1.setColumnWidth(i, width256). However, there remains a problem with the height; it is set everywhere - 12.75, and is not taken from the template.
I tried it on versions 2.14.0 and 3.0.0, I attach examples of each code and files.
I tried many different articles and methods and believe there is a solution without manually tampering with the columns, but unfortunately I haven't found it yet.
Kotlin.
class XlsxGenerator : ReportGenerator {
Template template_truck4p.xlsx
Result without manually width fix. result from template without manually width fix.xlsx
Result with manually width fix. result manually width fix.xlsx