Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add new table? #20

Open
dave-doty opened this issue Dec 27, 2019 · 7 comments
Open

how to add new table? #20

dave-doty opened this issue Dec 27, 2019 · 7 comments

Comments

@dave-doty
Copy link

How can I add a new table (a.k.a., "worksheet" in Excel terminology) to an existing spreadsheet?

@sestegra
Copy link
Owner

Unfortunately, this feature isn't implemented yet.

@shliama
Copy link

shliama commented Feb 15, 2020

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?

@shliama
Copy link

shliama commented Feb 15, 2020

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 🤔😉

@sestegra
Copy link
Owner

sestegra commented Feb 16, 2020

@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.

@justkawal
Copy link

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.

@shliama
Copy link

shliama commented Feb 16, 2020

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.

@justkawal
Copy link

justkawal commented Feb 16, 2020

@shliama You are correct thanks for highlighting it,
Now, It has been fixed and updated.

Long live open source :octocat:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants