Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

CSV conversion is failing from Cell.php  #419

Open
@caleb87

Description

@caleb87

When writing the excel file as CSV, the following error is generated:
Formula Error: An unexpected error occured' in Classes/PHPExcel/Cell.php:300 Stack trace: #0 Classes/PHPExcel/Worksheet.php(2466): PHPExcel_Cell->getCalculatedValue() #1 Classes/PHPExcel/Writer/CSV.php(134): PHPExcel_Worksheet->rangeToArray('A2:AE2', '', true) #2 PHPExcel_Writer_CSV->save('stateData/SD/te...') #3 convertXLStoCSV('.....

The function used was:

function convertXLStoCSV($infile,$outfile)
{

$fileType = PHPExcel_IOFactory::identify($infile);
$objReader = PHPExcel_IOFactory::createReader($fileType);

$objReader->setReadDataOnly(true);   
$objPHPExcel = $objReader->load($infile);    

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV');
$objWriter->save($outfile);

}

Any ideas why this is happening?

PS: Zip file is: http://www.sdgs.usd.edu/pubs/og/SDOILexport.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions