Comments (8)
Hi @DVendy,
Can you try 2 things to narrow down the issue?
- Change the location of the XLSX to make sure it can still be read
- Downgrade to version 1.0.7 (change composer.json: "box/spout": "1.0.7". I changed the way files are read on Windows, it may have broken the reader in some configurations.
from spout.
Tried both, still failed ...
from spout.
i have the same problem also tried the things adrilo sugested
from spout.
found this issue.. i was trying to read a .xls and this library only works with .xlsx
from spout.
@area722 Spout only works with XLSX files, sorry.
@DVendy, can you please share some code? If both solutions did not work, I'm not sure why it failed...
from spout.
public function import_spout(){
$reader = ReaderFactory::create(Type::XLSX);
$reader->open("data.xlsx");
while ($reader->hasNextSheet()) {
$reader->nextSheet();
while ($reader->hasNextRow()) {
$row = $reader->nextRow();
var_dump($row);
}
}
$reader->close();
}
Just like in documentation.
Oh yes and I used it in Laravel framework. Is there any extra configuration for laravel?
from spout.
The writer working flawlessly btw., :3
from spout.
Just to be sure, when you downgraded Spout to 1.0.7, did you run composer update
to update the source files?
Given the file path you mentioned, it seems like you are using Windows. And I made a change for Windows in the 1.0.8 version so it's really likely to be the cause of your problem.
If you've already done that, can you tell me which version of PHP you're using and if you are using WAMP/XAMPP. Also, if the file does not contain any sensitive data, would you mind sending it to me at adrien [at] box.com? It will help for debugging!
I'm not familiar with Laravel, but there should not be any additional configuration (and the writer works)
from spout.
Related Issues (20)
- Thanks to package authors! How does it work? HOT 1
- Style not present when editing existing spreadsheet
- It takes around 5 secs to read 1000 rows (25 cols) HOT 1
- This page isn’t working when calling $reader = ReaderEntityFactory:: HOT 1
- Previous issue #861 prematurely closed HOT 4
- Support Excel cell Comments HOT 2
- Unable to open source data
- Trying to add vertical alignment and fix textWrap for XLSXWriter HOT 1
- Add option to change the encoding of the whole exported csv file (not only the content) HOT 1
- PHP 8.1 Error HOT 4
- Incorrect type reported when adding an unsupported type to a cell
- Percentage type reading supported? HOT 1
- Content-Disposition header for file download is not properly encoded HOT 1
- Format date on export XLSX
- Is it possible to use wb instead of wb+ fopen mode in openToFile() in AbstractWriter in order to use compress.zlib:// ? HOT 5
- PHP 8.1 Warnings HOT 2
- Doing cell->getValue() on loop stops when the value is a DateTime Object
- rowIterator->next() crash HOT 5
- rowIterator->next()
- Count total number of rows for XLSX HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spout.