XLSX column Width and Data filters together.
-
Hello..!!
I'm setting the width of the columns in the XLSX template file by using the following tag:
{{#xlsxReplace "xl/worksheets/sheet1.xml"}}
<worksheet
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
<cols><col min="1" max="1" width="20"/><col min="2" max="2" width="30"/></cols> </worksheet>
{{/xlsxReplace}}But This is removing the Data filters I have applied on the default template file.
I am adding two pictures
- With the Width but Data filters got removed
- With the filters but it is looking ugly
is there any way to accommodate both width and Data filters?
Thank you..!
- With the Width but Data filters got removed
-
You want to replace just
colls
.{{#xlsxReplace "xl/worksheets/sheet1.xml" "worksheet.cols"}} <cols> <col min="1" max="1" width="51.42578125" customWidth="1"/> </cols> {{/xlsxReplace}} {{{xlsxPrint}}}
See the demo here
https://playground.jsreport.net/w/anon/zELi3rrD
-
Hey @jan_blaha , Thank you. It worked