PHP Library for reading Excel files
Questions tagged [phpexcelreader]
133 questions
2
votes
1 answer
How read merged and cells with background color in PHPExcel
I have function:
function funct($xls){
include_once '../system/PHPExcel/Classes/PHPExcel/IOFactory.php';
$objPHPExcel = PHPExcel_IOFactory::load($xls);
$objPHPExcel->setActiveSheetIndex(9);
$aSheet = $objPHPExcel->getActiveSheet();
…

Dmitriy Klochko
- 51
- 5
2
votes
3 answers
codeigniter phpexcel error ZipArchive::getFromName(): Invalid or uninitialized Zip object
i'm trying to import data to oracle from excel file (.xlsx) use codeigniter and phpexcel, this is my controller :
private $filename;
public function form(){
$data = array();
if(isset($_POST['preview'])){
$upload =…

Fajar Ardiansyah
- 47
- 1
- 8
2
votes
2 answers
How to read subscript/superscript/new line using PHPExcel library when importing excel file to PHP and storing in MySQL
I am having trouble saving the excel file in mysql database, It contains enter(new line) inside a cell and symbols & superscripts as well. But it stores as plain text only.
$objReader = new PHPExcel_Reader_Excel5();
$objPHPExcel =…

jazeabby
- 80
- 7
2
votes
1 answer
Import CSV file with tab delimited using PHPExcel lib
I'm trying to import CSV file using PHPExcel lib. My CSV file has \t or tab as delimiter.
So when I'm trying to printout the result in my screen, every comma seen as new cell, just like this
But actually I need to export data in one line for each…

Blackjack
- 1,016
- 1
- 20
- 51
2
votes
1 answer
Importing array from PHPExcel producing array to string error
I am trying to populate a table in php from an imported array using PHPExcel. I am getting the 'producing array to string error in' error. I believe it has to do with converting the array to string. The error says its from the line with…

brettg
- 39
- 6
2
votes
1 answer
Notice: iconv(): Detected an incomplete multibyte character in input string in Excel_reader.php
Excel_reader.php:
function _encodeUTF16($string) {
$result = $string;
if ($this->_defaultEncoding){
switch ($this->_encoderFunction){
case 'iconv' : $result = iconv('UTF-16LE', $this->_defaultEncoding, $string);
…

Pooojaaaa
- 183
- 1
- 4
- 16
2
votes
2 answers
How to format Excel cell with PHPExcel_Reader_HTML
I am using PHPExcel_Reader_HTML and passing it my HTML to generate excel file, but the problem is that it does not highlight the excel cell color as in the 'HTML' table (see image blow), I am using Laravel5

Bilal Maqsood
- 1,163
- 3
- 15
- 43
2
votes
0 answers
Get Columns Width
I am using PHPExcel library for reading Excel file. I want to get each column width.
I am trying the following code.
$objWorksheet->getColumnDimension('A')->getWidth();
$objWorksheet->getColumnDimension('B')->getWidth();
It always returns -1 not…

Shakeel Ahmed
- 1,526
- 17
- 22
2
votes
2 answers
PHPExcel XLS not recognised as an OLE file
I developed a PHP web application using PHPExcel libraries. All is working properly except with some Excel documents which strangely cannot be recognized as an Excel doc. When I open these files with Microsoft Excel and save them as xls, csv, xlsx,…

user3321425
- 201
- 1
- 2
- 17
2
votes
0 answers
PHPExcel custom named references not calculated
I have a lof of custom named calculations in a sheet which are used all over the place.
when I load the phpexcel object I can see all the names correctly as array named namedRanges.
However, when the final calculation has to be done, I get the wrong…

Niels
- 120
- 1
- 9
2
votes
0 answers
Excel 97-2003 file incompatible after PHPExcel reads and writes
I have an excel file that has been created and saved as an Excel 97-2003 file. I am using the following code to read and then write using PHPExcel.
$objReader = new \PHPExcel_Reader_Excel5();
$objPHPExcel = $objReader->load(storage_path() .…

BXD
- 21
- 2
2
votes
2 answers
Row 2 is out of range (2 - 1) laravel-excel
I am trying to import an excel file using laravel-excel so I used this algorithm
$result = Excel::load('public/uploads/test.xlsx',function($reader){
})->get();
but I get the following error :
PHPExcel_Exception in RowIterator.php line 125:
Row 2…

undefined
- 161
- 3
- 16
2
votes
1 answer
phpexcel - Making file to download rather than saving in the server
Here is my Code to Inserting image to Excel,

I'm Geeker
- 4,601
- 5
- 22
- 41
2
votes
1 answer
PHPExcel formula error
I am trying to read a workbook but I am getting following errors:
Fatal error: Uncaught exception 'PHPExcel_Calculation_Exception' with message 'Sheet (abc)!F6 -> ID!F3 -> Formula Error: Unexpected ')'' in…

Yogesh Asthana
- 99
- 2
- 9
1
vote
1 answer
PHPSpreadsheet autopopulating 0's in empty cells and the formulas are saved as string values
I have to paste the value of variable $val in cell 'B3' in Sheet 0.
After this, I have to export sheet1 as pdf.
But I can see that when I am converting sheet1 as pdf, the formulas are not printed 'as values' but they are printed as a…

NIKHIL NAIR
- 21
- 5