stephen-hardy / xlsx.js

XLSX.js is a JavaScript library for converting the data in base64 XLSX files into JavaScript objects - and back! Please note that this library is licensed under the Microsoft Office Extensible File License - a license NOT approved by the OSI. While this license is based off of the MS-PL, which is OSI-approved, there are significant differences.
http://blog.innovatejs.com/?tag=xlsx-js
Other
575 stars 122 forks source link

Make xslsx.js usable in nodeJS #13

Closed feugy closed 11 years ago

feugy commented 11 years ago

Hi Stephen.

I bundled your work to be usable at server side with NodeJS.

If you're ok with this pull request, you just need to publish it on NPM (Node Package Manager) (use npm publish) and all NodeJs user will be able to use your versionned library, the same way that java developpers use Maven and maven central repo.

Thanks a lot !

feugy commented 11 years ago

I've detected a huge problem in JSzip concerning: Java programs are not able to read zip files generated (more details at https://github.com/Stuk/jszip/pull/33). It has been fixed and I await for the JSzip maintener to accept the pull request.

In the same time, I've changed the package.json to temporary use my forked version of node-zip. The main contributor hasn't answered yet to my request to update its version of JSzip (he seems not involved any more...),

Sorry for that, but I must go on because this fix is prioritary for our project.

feugy commented 11 years ago

Hi Stephen.

I'm very glad to announced two major things for xlsx.js:

Therefore, xlsx.js is fully operationnal within browsers and NodeJS (we're using it at the office), and the evolutions you've made on 2.2.0 brought enough space for style evolutions.

I did my best to follow your code style, which should ease code review and integration of these features. There is also a simple round-trip unit test written in mocha/chai (works in browsers and NodeJS).

See ya.

stephen-hardy commented 11 years ago

Hi Feugy,

Nice work, thank you for this contribution! I've only had time to skim through your changes, but they look great from what I see!

My apologies for the late response on this. Usually I can only work on this as there is business need, and my efforts have been focused elsewhere lately. Thanks for your patience, and sharing back these great new features!

It is great to see the addition of NodeJS support. I've not worked with it yet, but I'm aware of some of the differences. Please let me know if any of my further changes break Node support, as I probably won't be aware of it and won't have the opportunity to test.

Two things I may be able to do in the near future are add picture support, and move over to zip.js. I've done the initial investigation for picture support, it shouldn't be too bad. And, I think the move to zip.js will be an improvement for everyone. I haven't done any testing yet, but it should be faster, better supported, and has a clearer license.

Thanks again!