natergj / excel4node

Node module to allow for easy Excel file creation
MIT License
1.38k stars 215 forks source link

Add checks for Excel limitations #237

Open alugowski opened 6 years ago

alugowski commented 6 years ago

Excel enforces various limits on things like character count, line count, link count, worksheet name length, etc. These are not limits of the XLSX format, and often other readers like LibreOffice, GSheets, or Numbers will happily open files that Excel complains about.

If any of the limits is exceeded then Excel pops up an uninformative "there is an error" popup.

image

This can make debugging tricky, especially if the developer doesn't have access to Excel itself.

Microsoft publishes a list of Excel limits: https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3

In addition, there is a limit on the character count of worksheet names (31). See #140

My feature request is to add checks for the more common and easy to check for limits. Potentially include a way to turn off the checks for applications that must exceed them and don't need to target Excel itself.

Easy checks include character/line count in a cell, total number of links, worksheet name length, number of styles.