-
Notifications
You must be signed in to change notification settings - Fork 36
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
xlsx fails to load due to non-standard stylesheet and workbook locations #79
Comments
More info - my first thought seems to have been wrong.
Version ParseExcel after unzipping the xlsx file into its own directory
|
Just for emphasis:
and
Looking at _rels/workbook.xml.rels, there is no actual Target="stylesheet.xml", at least, not in that folder. The only other reference to stylesheet: |
Further... If I edit _rels/workbook.xml.rels, and change to The file parses.I'm guessing here, but I suspect when Excel opens the file, it has a harder look for stylesheet.xml than ParseXLSX is doing. Another possibilty is that it just throws up it's hand and says open the file anyway, without the stylesheet info. Will experiment. Looking at the info in stylesheet, and the way Excel displays the file, I suspect it's the former (stylesheet seems to have been applied). |
Further still... If we define "valid spreadsheet file" as one successfully read by Excel, then this is a valid spreadsheet file. Once again
We see that, in _rels/, we have a workbook.xml.rels file. _rels/.rels defines a target of workbook.xml (no ".rels"). I'm not currently sure which target is looked for first, but one assumes it's 'stlyesheet.xml', as that's where it's erroring. One assumes that fixing the location of stylesheet (which I will do manually do next) will cause the error to become "not found workbook.xml". |
Right. I can confirm that if I manually edit _rels/workbook.xml.rels and adjust ParseXLSX can parse the sheet. I can print the value in $ws->get_cell(0,0) correctly. Excel can still successfully read the file (it is still a "valid workbook") I see a possible approaches here. I'll continue playing with it. |
Hi gang,
test_sheet_new.xlsx
The attached file is a valid spreadsheet (can open in Excel) but stylesheet.xml and worksheet.xml, rather than being in /xl/, are in / and consequently, the sheet cannot be opened.
To test, run parse on the file. Error message indicates stylesheet.xml cannot be found.
The text was updated successfully, but these errors were encountered: