Posted 7 May 2025, 11:56 pm EST
Hi,
Please find attached image I want these checkboxes as checked where as soon as I click on export button.
Regards,
Priya B
Forums Home / Spread / SpreadJS
Posted by: priyatama.bhadke on 7 May 2025, 11:56 pm EST
Posted 7 May 2025, 11:56 pm EST
Hi,
Please find attached image I want these checkboxes as checked where as soon as I click on export button.
Regards,
Priya B
Posted 9 May 2025, 6:40 am EST
Hi,
It is possible to mark the required checkboxes as checked as soon as the Export button is clicked. Please refer to the code snippet below that sets the designer data and overrides the default checkbox state to checked:
const fileMenuSetting = designer.getData("fileMenuSetting") || {};
designer.setData("fileMenuSetting", {
...fileMenuSetting,
exportXlsxOptions_includeStyles: true,
exportXlsxOptions_includeFormulas: true,
exportXlsxOptions_includeUnusedNames: true,
exportXlsxOptions_saveAsView: true,
exportXlsxOptions_includeBindingSource: true,
exportXlsxOptions_includeAutoMergedCells: true,
exportXlsxOptions_rowHeadersAsFrozenColumns: true,
exportXlsxOptions_columnHeadersAsFrozenRows: true,
});
You can further refer to the attached code sample that uses the above code snippet and checks the checkboxes every time the Export file menu panel opens (see below).
Please feel free to reach out if you encounter any further issues or require additional guidance.
Attachment: CheckedExport.zip
Best Regards,
Chirag Gupta