Hello everyone!
Iโm excited to share my very first Directus extension: Excel to JSON. This extension lets you easily convert Excel and spreadsheet files into clean JSON, right inside your Directus flows.
Done! Instantly get your data as JSON for further automation.
Installation:
You can install it from the Directus Marketplace if MARKETPLACE_TRUST=all is set; otherwise, manual install is needed. Note: Currently, it supports only local storage files; cloud storage support is coming soon.
Feedback & Collaboration
This is my first extension, so any help, advice, or feedback is very welcome!
If you have suggestions, ideas, or want to contribute, please check out the repo or leave a comment.
Does this support batching? I have some files with 400,000+ lines and Iโm trying to find a way to efficiently and reliably add or update based on the primary key. I understand your plugin will parse my excel document, and create Json. However, if would be nice if it generated batches of JSON in X count per batch so I donโt overload the system when doing so.
I donโt think the extension currently support such a large number of rows, since in line 29 we buffer the whole file at once. Also in line 36 we extract the entire file result. So, that wonโt work with big files.
imho, I think you need to split the file into chunks using the current package (if SheetJS supports that) or using similar package to split or stream it.
Iโm trying to find a way to efficiently and reliably add or update based on the primary key
Whatโs also good about Directus is that in the for loops (using the trigger flow operation) you can select the iteration mode to handle the update process