how to add new table?
How can I add a new table (a.k.a., "worksheet" in Excel terminology) to an existing spreadsheet?
Unfortunately, this feature isn't implemented yet.
Jeez, I was figuring out why changes to SpreadsheetDecoder#_tables won't do anything just to discover that every row/column operation is checking against SpreadsheetDecoder#_sheets field. Which is immutable :(
@sestegra do you face any particular challenge implementing this feature?
Hmm, looks like somebody has solved the issue already https://github.com/kawal7415/excel_it/blob/master/lib/src/excel.dart
The source code looks suspiciously like yours @sestegra 🤔😉
@shliama My current challenge is only to find free time to implement this feature.
Then, thank you to pointing me out the library from @kawal7415 In fact, the starting point of the project is a fork of this one: See https://github.com/kawal7415/excel_it/blob/220293f1f66a4a60bca54229c153c71481832cb1/README.md
It would be nice of him/her to discuss here. For instance, create pull requests on this project to support the features that are not available yet.
Thanks @shliama for getting the conversation started and font and background color , alignment , wrapping and spanning of rows and columns feature will be rolling out with a week.
Thanks @sestegra for the code of spreadsheet_decoder without your code I would have not been able to kickstart it.
It was bit hard to understand tons of lines but somehow with debugging made it easy to understand the approach.
Long live open source :octocat:
I've tested the "Add new table" feature from the @kawal7415 fork and it does not work properly.
Microsoft Office, Apple Number, and Google Sheets open such files differently, either all sheets have the name of the last sheet that was added or all sheets have proper names but only the last one has the data inside. And lastly, Microsoft Office says that the file is corrupted and loses all data if I try to force open it. Will try to write js interop for https://github.com/SheetJS/sheetjs library.
@shliama You are correct thanks for highlighting it, Now, It has been fixed and updated.
Long live open source :octocat: