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

Could Excel 'Tables' be 'first class citizens' in import and export ? #947

Open
jgranduel opened this issue Apr 24, 2024 · 2 comments
Open

Comments

@jgranduel
Copy link

Hi,

after discovering Power Query a few years ago, I use Excel tables whenever I can instead of classical ranges. They provide many advantages and make Excel dataset closer to databases. Tables are named. When importing data from Excel using Power Query, tables are fully recognized as like sheets. A few library recognize them, like Apache POI or ExcelJS for the ones I know.

Would it be possible for grist to recognize tables and load them directly into SQLite tables ? and on the other way round, could Grist tables be exported as tables ?

Thanks for this project!

@dsagal
Copy link
Member

dsagal commented May 12, 2024

We do use ExcelJS for exports already, so that direction may be easier. I personally have little experience with Excel tables. Is there any downside to always exporting Grist data as "tables"? Or should it be an option?

For imports, we use openpyxl (on Python side). Don't know if that supports tables, or how you'd want to present the options. I'd guess that data in a "table" would also be available as part of the sheet that contains this table, so would it create confusion to the user what's being imported where?

@jgranduel
Copy link
Author

Hi,

thanks a lot for taking my question into consideration. ExcelJS handles Excel tables correctly as far as I know (I often run a little script from NodeJS to extract Excel tables into json).

I don't see any downside from my point of view. I am not an expert in any case. I have just noticed that there is a payload in XML which makes the size of the resulting Excel a little bigger. That might vary with the data length of course. Power Query only creates tables, but reads cells, ranges, tables or whole sheets. People who don't know tables might be suprised by the layout, or some constraints (not being able to merge cells for instance), but that's really a minor thing and tables have been here for almost 15 years... All together, I think it should really be the default option.

I don't use Python. I tried nevertheless to load a workbook with openpyxl and it works well (I followed this example on SOF).

So my conclusion : I do hope you can implement tables in Grist 😉 !

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

No branches or pull requests

2 participants