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.

4 answers

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

Public
Maksym Diachenko Maksym Diachenko Flexmonster October 22, 2024

Hello,

Hope you are doing well.
We are wondering if you tried using the suggested workaround to remove additional blank rows from the Excel sheet header and footer.
Looking forward to hearing your reply.

Best Regards,
Maksym

Public
Amogh Arsekar November 8, 2024

Hello,

Thanks for the follow up. Yes, I'm using the suggested the workaround to remove the additional blank rows.

Public
Maksym Diachenko Maksym Diachenko Flexmonster November 8, 2024

Hello,

Thank you for your reply.
We are glad to hear that the suggested workaround works for you.
Do not hesitate to contact us if any other questions arise.

Best Regards,
Maksym

Please login or Register to Submit Answer