I've reworked zipcelx into a class since it fits better into our application workflow. Just leaving this here for reference in case this is useful to you.
Notably, the public API is split between analyze, build and download, the console calls are gone in favor of actual thrown errors and the lodash dependency was removed since it's really just a few lines of code that don't do anything special.
The workflow changes to the following:
import Spreadsheet from 'zipcelx';
try {
const mySheet = new Spreadsheet( [ /* sheet data */ ] );
} catch ( error ) {
console.error( `Could not create my sheet: ${error.message}` );
}
await mySheet.download( 'desired-filename-without-extension' );
console.log( 'file has been downloaded.' );
See the gist here.
Thank you for the library, it's coming in handy over here 😉
I've reworked zipcelx into a class since it fits better into our application workflow. Just leaving this here for reference in case this is useful to you.
Notably, the public API is split between
analyze,buildanddownload, theconsolecalls are gone in favor of actual thrown errors and the lodash dependency was removed since it's really just a few lines of code that don't do anything special.The workflow changes to the following:
See the gist here.
Thank you for the library, it's coming in handy over here 😉