gneustaetter / xlsxreader Goto Github PK
View Code? Open in Web Editor NEWPHP class for reading data from Excel XLSX files
License: Other
PHP class for reading data from Excel XLSX files
License: Other
这行(this line),大概198行左右(about 198 lines)
$maxValues = $this->getColumnIndex($cells[1]);
We have received the same problems many times from our customers, but we don't know the Excel content when they upload, so I want to know in which situation the Exception occurs.
vary thanks! Looking forward to your response!
I think it would be great if this class has option that oryginal class has - __construct parameter that allows you to tell if you're sending string of filename or sting of file content to compute.
Before last weekend, I was able to read XLSX files. As of last weekend, any type of XLSX file I try to open returns a ZipArchive::ER_NOENT
status code. I've tested two types of XLSX files that were verified by running file test.xlsx
in Linux:
Both these files open with LibreOffice Calc.
The line that returns the error is in XLSXReader.php: $status = $this->zip->open($filePath);
Why are neither of my XLSX files reading suddenly?
I've tested the following Zip classes and they all fail when attempting to use ZipArchive::open. It seems the open method uses the zlib library, which seems to use the [libzip](https://libzip.org/)
library.
So, it seems the issue is with lib zip.
Trying to run on PHP 5.2, generates the following error
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in xlsxreader.php on line 280
The offending line:
$value = $self::parseRichText($cell->is);
I think this error is because PHP 5.2 doesn't support $stringClassName::methodName() syntax. Wondering, Is there a workaround for this?
The method parseRichText() concatenates all text found in individual text runs with a white-space, i.e. by implode(' ', $value)
on line 315 in v0.4.
At least with our XLSX this turns out to be wrong since it adds white-space between differently formatted text elements in one cell and by that doubling existing white-space. Changing it to implode('', $value)
solved the problem.
Hi Dear Gneustaetter. I doubt why not add a composer.json file to your project in order to provide composer service for PHP coder all around the world.
I like your XLSXReader very much so I use it in my project .
But I also use composer to manage code of open source. I have no choice untill a composer.json file be added into the project .
this is my folk :
https://github.com/newlubin/XLSXReader
Hope to hear from U Email: [email protected]
$data = array_map(function($row)
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /opt/lampp/htdocs/dbis/venki/AmBank/XLSXReader-master/sample.php on line 62
Pleae help me to solve
code is as follows
$data = array_map(function($row)
{
$converted = XLSXReader::toUnixTimeStamp($row[0]);
return array($row[0], $converted, date('c', $converted), $row[1]);
}, $xlsx->getSheetData('Dates'));
array_unshift($data, array('Excel Date', 'Unix Timestamp', 'Formatted Date', 'Data'));
array2Table($data);
?>
reply to email as [email protected]
This is purely a data structure issue, and your taste may vary from mine.
On 113 of the class, you use the sheetId as the array key for the data returned on getSheetNames()
I can see the logic behind it, but when presented with a numeric key array, I don't expect my array to be in order and not start at 0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.