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

bug "Custom Styles" #366

Open
Open
@milancoin-project

Description

@milancoin-project

i set the excel2007 model file format if the value is 0 then view -
_ * #,##0.00_ ;_ * -#,##0.00_ ;_ * "-"??_ ;_ @_
'---------------------
'0num
'---------------------
' -
'---------------------
then i use the phpexecel open the file and write same value and save like this code:

require_once '../sigmagrid/phpexcel/PHPExcel/IOFactory.php';
$fname = tempnam("./ajax", "temp.xlsx");
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load("ajax/export2007.xlsx");
foreach($retArraya as $r => $dataRow) {
        $objPHPExcel->getActiveSheet()->setCellValue(substr($dataRow[2],0,1) . $dataRow[1], $dataRow[3]);
}
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save($fname);
header("Content-Type: application/x-msexcel; name=\"out.xlsx\"");
header("Content-Disposition: inline; filename=\"out.xlsx\"");
$fh=fopen($fname, "rb");
fpassthru($fh);
@fclose($fh);
@unlink($fname);

the file looks like
'------------------
'0num
'------------------
' 0
'------------------

i look the format is normal. not
_ * #,##0.00_ ;_ * -#,##0.00_ ;_ * "-"??_ ;_ @_

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