Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Windows wamp server problem #3

Closed
kevas opened this issue Mar 10, 2015 · 1 comment · Fixed by #12
Closed

Windows wamp server problem #3

kevas opened this issue Mar 10, 2015 · 1 comment · Fixed by #12

Comments

@kevas
Copy link

kevas commented Mar 10, 2015

Hi,

on windows wamp server it throws this error:

XMLReader::open(zip://D:/wamp/www/lumidee/user_uploads/xls_import/create/katalog-lucis.xlsx#/xl/worksheets/sheet1.xml): failed to open stream: operation failed

Can you help me with this error?

@adrilo
Copy link
Collaborator

adrilo commented Mar 12, 2015

Thanks for filing this issue!
The library was meant to be used on Unix-based systems and has not been tested on Windows environment. I'm going to look into it

adrilo pushed a commit that referenced this issue Apr 4, 2015
Fixes #3:
The sheetN.xml files location is dynamically retrieved when parsing
[Content_Types].xml. In this file, the location is like "/xl/worksheets/sheet1.xml".

Because the zip stream wrapper expects the zip entry name to be like
"xl/worksheets/sheet1/xml" (without the first "/"), this first "/"
needs to be trimmed. It was trimmed using:
  ltrim($this->dataXmlFilePath, DIRECTORY_SEPARATOR);
which obvisously does not work on Windows platform where DIRECTORY_SEPARATOR is "\".
Replacing DIRECTORY_SEPARATOR by '/' solves this issue.
@adrilo adrilo closed this as completed in #12 Apr 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants