Search code examples
windows-store-appswinjsproject-siena

Project Siena: import Excel Data


Does anybody know what library Project Siena uses to import Excel data. when you publish the app you get some JavaScript files, but I can't figure out which one is used for this.


Solution

  • Siena has its own importer, which utilizes the fact that xlsx files (Siena doesn't import .xls binary formats) are .zips file with a different extension. It's just unzipping the file and then parsing the XML contained therein.

    That said, importing Excel data happens in the Project Siena app, not in the app it generates as output (in other words, Excel data is static). If you look in the generated app project, you'll find a file called js/init.js that contains the imported data as JSON, so no additional importing is necessary. Hence you won't necessarily find an Excel importer in the app code.

    Siena does pull jszip.js and sax.js into the appfor unzipping and XML parsing, specifically, so one could use these to unzip an xlsx file and parse the XML contents. But there's not something there that you can conveniently repurpose.