Need Some Help? We are here for you!
We have a very friendly service - Come and chat to us and let us know what you need, we work for an hourly fee and can also provide you a no obligation quote and begin work immediately in most cases. Click "Request Support" or use our Live Chat.Request Support
There are various ready-made and well maintained PHP libraries for converting/processing XLSX – and by no means are these libraries bad, they have a ton of features for creating/editing and reading XLSX files. Two libraries I have tried personally are PHPEXCEL or the newer library PHPSpreadsheet.
So what is the problem with these? They cater for a whole bunch of things, making them useful for various tasks, however the problem lies with footprint and processing times when you are looking to read medium to large XLSX files -they are prone to eating resources, taking too long or timing out completely.
When looking for straight up conversion and/or processing XLSX for various tasks such as feeds, these libraries are not optimized and are not optimized for the task, even failing completely if the XLSX is large enough.
Super Fast XLSX to CSV that can handle huge files
Our XLSX to CSV conversion script is purpose built for converting XLSX files directly to CSV, making them easy to process with built in PHP CSV functions. It is not only much faster at converting XLSX to CSV – it can handle absolutely HUGE XLSX files without using up huge amounts of server resources, meaning you do not have to be operating a massive server.
We have created our own functions that perform the conversion with the best performance possible, allowing conversions of large XLSX files super-fast and memory efficient, our script can reliably, quickly and effortlessly convert XLSX files for you allowing your application to process data as you see fit.
Whats more our script allows you to process multiple sheets in an XLSX by allowing you to define which sheet to read out of the file.
Our script comes raw and is usable for any projects you desire, no code obfuscation, no encryption, you buy it, use it in your projects whether business or personal. All we ask if you be fair if your using this script a lot, consider paying us more in the future if your feeling generous.
How it works
its easy really, no complicated classes, our script is just a function in a file – you can embed it into your object model structure or use the function raw if you choose. Here is an example call to our function:
<?php /* You can use XLSX2CSV very easily as shown below, just change the paths to the correct paths you need. */ $xlsx_file = '/path/to/file.xlsx'; $xlsx_unzip_path = '/unpack/here/'; //make sure this is a unique empty folder (especially if using the cleanup) $csv_file = '/path/to/result.csv'; $sheet = 1; $throttle = false; //you can set this to ie. 100 to fetch only 100 rows $cleanup = true; //if you dont want to cleanup all the junk you can turn this off. xlsx2csv($xlsx_file, $xlsx_unzip_path, $csv_file, $sheet, $throttle, $cleanup); ?>
22/05/20 – 2.4.0 – Fixed an major issue where processing could get stuck in an infinite loop causing maxout of resources.
12/05/20 – 2.3.0 – Added ability for the processor to parse date columns from excel to actual string dates in the csv instead of EPOCH time.
17/02/20 – 2.2.0 – Fixed an issue where some XLSX files would sometimes handle blank cells incorrectly shifting data to the left in the CSV and causing data misalignment.
22/08/19 – 2.1.0 – Fixed a small bug from dropbox editor and how it saves the sharedstrings causing issues with the parser.
SHARING IS CARING!