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

node 0.8 file name issue #84

Closed
SheetJSDev opened this issue Jan 30, 2014 · 5 comments
Closed

node 0.8 file name issue #84

SheetJSDev opened this issue Jan 30, 2014 · 5 comments

Comments

@SheetJSDev
Copy link
Contributor

This happens with every XLSX/XLSB/XLSM zip from http://oss.sheetjs.com/test_files/

node -pe "var fs = require('fs'), jszip = require('jszip'); Object.keys(new jszip(fs.readFileSync('./test_files/formula_stress_test.xlsx')).files)"

In node 0.10 the files keys are correct, but in 0.8 the paths are incorrect:

[ '[Content_Types].xmlxml',
  '_rels/',
  '_rels/.relsels',
  'xl/',
  'xl/_rels/',
  'xl/_rels/workbook.xml.relsk.xml.relsls',
  'xl/workbook.xmlook.xmlxml',
  'xl/worksheets/',
  'xl/worksheets/sheet4.xmleet4.xml',
  'xl/worksheets/sheet1.xmleet1.xml',
  'xl/pivotTables/',
  'xl/pivotTables/pivotTable1.xmlivotTable1.xmle1.xmlml',
  'docProps/',
  'docProps/thumbnail.jpegil.jpegpeg',
  'xl/worksheets/sheet3.xmleet3.xml',
  'xl/worksheets/sheet2.xmleet2.xml',
  'xl/worksheets/_rels/',
  'xl/worksheets/_rels/sheet1.xml.relsels',
  'xl/pivotTables/_rels/',
  'xl/pivotTables/_rels/pivotTable1.xml.rels.xml.rels',
  'xl/styles.xmls.xml',
  'xl/sharedStrings.xml.xml',
  'xl/worksheets/sheet8.xmleet8.xml',
  'xl/theme/',
  'xl/theme/theme1.xmlxml',
  'xl/worksheets/sheet6.xmleet6.xml',
  'xl/worksheets/sheet7.xmleet7.xml',
  'xl/worksheets/sheet9.xmleet9.xml',
  'xl/worksheets/sheet10.xmleet10.xml',
  'xl/worksheets/sheet5.xmleet5.xml',
  'xl/pivotCache/',
  'xl/pivotCache/pivotCacheRecords1.xml.xml',
  'xl/pivotCache/_rels/',
  'xl/pivotCache/_rels/pivotCacheDefinition1.xml.relsfinition1.xml.relsls',
  'docProps/app.xml',
  'xl/calcChain.xml',
  'xl/pivotCache/pivotCacheDefinition1.xmlon1.xmlxml',
  'docProps/core.xml' ]

You can see how the file names appear to have repeated characters (e.g. _rels/.relsels is supposed to be _rels/.rels

SheetJSDev added a commit to SheetJS/sheetjs that referenced this issue Jan 30, 2014
@dduponchel
Copy link
Collaborator

Thanks for the bug report !
The bug comes from a Math.max / Math.min inversion, fixed by #60 and released in the v2.0.
It seems that the jszip npm package missed some commits. The next release (I may have the time to do it this weekend) will add support for npm (thanks @calvinmetcalf) and should ease the maintenance of the fork.
@calvinmetcalf I will contact you after the next release to see how to merge our works.

@dduponchel
Copy link
Collaborator

@SheetJSDev the version 2.1.0 has just been released, upgrading should fix your issue.

@SheetJSDev
Copy link
Contributor Author

@dduponchel I am seeing a strange warning from npm:

npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/imaya/zlib.js)

Do you see something similar?

SheetJSDev added a commit to SheetJS/sheetjs that referenced this issue Feb 6, 2014
- node jszip updated to 2.1.0 as per Stuk/jszip#84
- travis 0.8 tests restored
- get_formulae ignores undefined values
- updated test_files to 20140206
@dduponchel
Copy link
Collaborator

Everything works on my machine. From this issue it seems you will need to install git.
We declared the zlib.js dependency as follow :

  "dependencies":{
       "zlib.js" : "git://github.com/imaya/zlib.js#0.1.7"
  }

I don't know if there is a way without a zlib.js npm package.

@SheetJSDev
Copy link
Contributor Author

@dduponchel I think it was confused because of the tag. Changing the url to git://github.com/imaya/zlib.js resolved the issue (this isn't the right fix, I know :)

honestdeveloper1985 added a commit to honestdeveloper1985/js-xlsx that referenced this issue Nov 18, 2018
honestdeveloper1985 added a commit to honestdeveloper1985/js-xlsx that referenced this issue Nov 18, 2018
- node jszip updated to 2.1.0 as per Stuk/jszip#84
- travis 0.8 tests restored
- get_formulae ignores undefined values
- updated test_files to 20140206
KingTiger001 added a commit to KingTiger001/sheet-project that referenced this issue Dec 18, 2022
KingTiger001 added a commit to KingTiger001/sheet-project that referenced this issue Dec 18, 2022
- node jszip updated to 2.1.0 as per Stuk/jszip#84
- travis 0.8 tests restored
- get_formulae ignores undefined values
- updated test_files to 20140206
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