myliang / x-spreadsheet

The project has been migrated to @wolf-table/table https://github.com/wolf-table/table
https://myliang.github.io/x-spreadsheet
MIT License
13.98k stars 1.67k forks source link

Automatically expand column range if source data contains more than 26 columns #612

Open SheetJSDev opened 1 year ago

SheetJSDev commented 1 year ago

When specifying data with loadData, if the worksheet cols object does not have a len property, x-spreadsheet assumes 26 columns (A:Z).

If len is not specified or if cols is not specified, loadData should look at the longest cells array and expand the range if needed. Ideally it would also expand if len is smaller than the longest cells array (but there are also good reasons not to override the cols property)