Comments (5)
It's hard to say anything without the actual file to look at. Can you post the file somewhere to see what the issue is?
from spreadsheet-reader.
Thank you for the quick reply.
i tried to post it here , but it only receive image files.
The file is a very simple and basic excel file made with Office 2007 Excel.
just made a new Excel sheet and saved it as xls. thats it...
in order to attach it here, i renamed the xls file extension to "jpg" and added it here as attachment. so just rename it back to xls.
from spreadsheet-reader.
It looks like the file is treated as a text file when uploaded. When I try reading the file from disk, it works fine. It seems that when the file is uploaded, you use the tmp_name
as the file path which doesn't give any clue as to the file type, and the library defaults to TXT/CSV instead of XLS.
There are two more parameters to the constructor, I'd suggest setting them as well:
public function __construct($Filepath, $OriginalFilename = false, $MimeType = false)
something like this:
$Reader = new SpreadsheetReader($_FILES['file']['tmp_name'], $_FILES['file']['name'], $_FILES['file']['type']);
Those two additional parameters would give more clues as to what type of file it is.
from spreadsheet-reader.
ok, thanks, i will try what you wrote.
The file in the system, is indeed called upload/1ae68738-71bb-f6c3-1b84-55af4d759d7b
and not upload/1ae68738-71bb-f6c3-1b84-55af4d759d7b.xls
i will rename it in the code and add the ".xls" before using the constructor.
will update....
from spreadsheet-reader.
Yes, it solved the problem.
i added an ".xls" at the end of the file that the system uploads and its working.
thank you!
from spreadsheet-reader.
Related Issues (20)
- dead project? HOT 2
- Precision issue on minutes
- how i can delete some worksheet HOT 1
- Search in cell
- xlsx not readable in wordpress
- getting the row counts
- Max characters per row? How to disable?
- Get empty cell from csv file.
- Arbitrary file read vulnerability HOT 3
- How to get selected column?
- Date not usable HOT 1
- different constructor style
- Zip Bomb attacks prevention issue
- mime type not working
- Warning: "continue" targeting switch is equivalent to "break"
- Fatal error: Uncaught ValueError: XMLReader::open(): Argument #1 ($uri) cannot be empty HOT 1
- Deprecated: Implicit conversion from float xx.xxxx to int loses precision in excel_reader2.php on line 922 HOT 1
- its only showing the 2nd last of the data, how could i fix this?
- not showing all data in the file HOT 1
- hidden sheet issue
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 spreadsheet-reader.