Ashley Sheridan If it's just the data you need, try using a csv file instead. The Excel format is closed, and as such, the PHP classes won't have full support for all of it's features. It seems like formatting is causing the data to be written to the spreadsheet differently maybe.
![]() --> Notice
Excel Viewer has been retired
Important
The Microsoft Excel Viewer was retired in April, 2018. It is no longer available for download or receive security updates. To continue viewing Excel files for free, we recommend installing the Excel mobile app or storing documents in OneDrive or Dropbox, where Excel Online opens them in your browser. For the Excel mobile app, visit the store for your device:
Summary
The Microsoft Excel Viewer is a small, freely redistributable program that lets you view and print Microsoft Excel spreadsheets if you don’t have Excel installed. In addition, the Excel Viewer can open workbooks that were created in Microsoft Excel for the Macintosh.
The Excel Viewer can open the latest version of Excel workbooks, but it will not display newer features.
More Information
The Microsoft Excel Viewer is the latest version of the viewer. It can read the file formats of all versions of Excel, and it replaces the Microsoft Excel Viewer 2003.
Other options for free viewing of Excel workbooks
Note
The Excel Viewer is available only as a 32-bit application. A 64-bit version of the Excel Viewer does not exist. The 32-bit version of the Excel Viewer can be used on 64-bit versions of Windows.
The file name of the Excel Viewer is xlview.exe. The default folder location for the Excel Viewer on a 32-bit operating system isc:Program FilesMicrosoft OfficeOffice12. The default folder location for the Excel Viewer on a 64-bit operating system is c:Program Files (x86)Microsoft OfficeOffice12.
Note
If you already have a full version of Microsoft Excel installed on your computer, do not install Microsoft Excel Viewer in the same directory. Doing this causes file conflicts.
File formats supported
The Excel file formats supported are .xlsx, .xlsm, .xlsb, .xltx, .xltm, .xls, .xlt, .xlm, and .xlw. Macro-enabled files can be opened (.xlsm, .xltm, and .xlm), but the macros do not run.
Known issues with newer versions of Excel workbooks and the Excel Viewer
Even though the Excel Viewer can read the latest Excel workbooks, the following new features are not visible or are displayed differently in the Excel Viewer.
If you have to view or use these features, use Excel Online.
spreadsheet-reader is a PHP spreadsheet reader that differs from others in that the main goal for it was efficientdata extraction that could handle large (as in really large) files. So far it may not definitely be CPU, timeor I/O-efficient but at least it won't run out of memory (except maybe for XLS files).
![]()
So far XLSX, ODS and text/CSV file parsing should be memory-efficient. XLS file parsing is done with php-excel-readerfrom http://code.google.com/p/php-excel-reader/ which, sadly, has memory issues with bigger spreadsheets, as it reads thedata all at once and keeps it all in memory.
Requirements:
Usage:
All data is read from the file sequentially, with each row being returned as a numeric array.This is about the easiest way to read a file:
However, now also multiple sheet reading is supported for file formats where it is possible. (In case of CSV, it is handled as ifit only has one sheet.)
You can retrieve information about sheets contained in the file by calling the
Sheets() method which returns an array withsheet indexes as keys and sheet names as values. Then you can change the sheet that's currently being read by passing that indexto the ChangeSheet($Index) method.
Example:
If a sheet is changed to the same that is currently open, the position in the file still reverts to the beginning, so as to conformto the same behavior as when changed to a different sheet.
Testing
From the command line:
In the browser:
Notes about library performance
TODOs:
Licensing
All of the code in this library is licensed under the MIT license as included in the LICENSE file, however, for now the libraryrelies on php-excel-reader library for XLS file parsing which is licensed under the PHP license.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |