issue saving an excel file

Topics: Developer Forum, User Forum
May 30, 2013 at 1:51 PM
Hello,

I am getting this error.

Fatal error: Uncaught exception 'PHPExcel_Exception' with message 'Invalid cell coordinate contcyc+0.0001' in D:\inetpub\EcoPowerEngineWashProd\wwwroot\EcoPortal\CustomerPortal\engine\Classes\PHPExcel\Cell.php:539 Stack trace: #0 D:\inetpub\EcoPowerEngineWashProd\wwwroot\EcoPortal\CustomerPortal\engine\Classes\PHPExcel\Cell.php(592): PHPExcel_Cell::coordinateFromString('contcyc+0.0001') #1 D:\inetpub\EcoPowerEngineWashProd\wwwroot\EcoPortal\CustomerPortal\engine\Classes\PHPExcel\Cell.php(567): PHPExcel_Cell::absoluteCoordinate('contcyc+0.0001') #2 D:\inetpub\EcoPowerEngineWashProd\wwwroot\EcoPortal\CustomerPortal\engine\Classes\PHPExcel\Writer\Excel2007\Workbook.php(327): PHPExcel_Cell::absoluteReference('contcyc+0.0001') #3 D:\inetpub\EcoPowerEngineWashProd\wwwroot\EcoPortal\CustomerPortal\engine\Classes\PHPExcel\Writer\Excel2007\Workbook.php(304): PHPExcel_Writer_Excel2007_Workbook->_writeDefinedNameForNamedRange(Object(PHPExcel_Shared_XMLWriter), Object(PHPExcel_NamedRange)) #4 D:\inetpub\EcoPowerEngineWashProd\wwwroot in D:\inetpub\EcoPowerEngineWashProd\wwwroot\EcoPortal\CustomerPortal\engine\Classes\PHPExcel\Cell.php on line 539

I have used the same code in the past and everything worked awesome. I am not sure what this means.

I have pasted my code below

<?php
require 'includes/Cust_Portal.php';
require 'includes/Cust_DB.php';
date_default_timezone_set('America/New_York');

/* Error reporting /
error_reporting(E_ALL);

/ Include path /
ini_set('include_path', ini_get('include_path').';Classes/');

/* PHPExcel /
include 'engine/Classes/PHPExcel.php';

$inputFileName = 'engine/FBSv41.xlsm';
$NewFileName = 'engine/FBSv42.xlsm';

$objReader = new PHPExcel_Reader_Excel2007();

$objReader->setReadDataOnly(true);

$objPHPExcel = $objReader->load($inputFileName);

$objPHPExcel->setActiveSheetIndex(0);

$objPHPExcel->getActiveSheet()->SetCellValue('A1', '1');

$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);

$objWriter->save($NewFileName);

// header('Location: results.php?c=' . $_POST['c']);

?>

Aug 14, 2013 at 11:20 AM
that's a macro file... i'm not sure that will work with phpexcel except the case you will quit your macros... maybe that was your problem