We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Extra row after Header and before Footer

Answered
Amogh Arsekar asked on September 11, 2024

I was using the header and footer properties provided for the exportTo method but noticed that they add an additional empty row after the header and before the footer. I want to prevent this because I have common functions used to style my excel sheets based on the the row indexes and these additional rows are causing an issue when I try to style the excel exported using flexmonster.

1 answer

Public
Maksym Diachenko Maksym Diachenko Flexmonster September 12, 2024

Hello,

Thank you for reaching out to us.

Please note that this behavior is intentional because it creates a distinction between the header, footer, and table contents. Separating these components with a blank row makes it easier to distinguish the header and footer clearly and not mistake them for part of the data. We suggest changing your Excel styles to work with additional rows or removing them by customizing the exported Excel sheet as a workaround.

To customize the exported sheet, we recommend using the exportTo API call with the destinationType parameter set as "plain". With this method, Flexmonster passes the exported Excel file to a callback handler as an Uint8Array. After this, you can use a JS library like XLSX to remove these delimiter rows from the Excel sheet. You are welcome to check the example of Excel export with plain destination type: https://jsfiddle.net/flexmonster/Lpneu2xt/

Please let us know if our answer helped you.

Best Regards,
Maksym

Please login or Register to Submit Answer