Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: Problems with appending using fromArray

$
0
0
I'm trying to append rows to an existing spreadsheet. I can open the existing sheet and find its dimensions - and therefore the last row - using this:
$findDimensions = $objPHPExcel2->getActiveSheet()->calculateWorksheetDimension();

I have the new data in a two-dimensional PHP array $newData, but when I try to append using:

$objPHPExcel2->getActiveSheet->fromArray($newData, null, 'A'.$appendStartRow);

...where $appendStartRow is 2 or greater, I get this:

Notice: Undefined property: PHPExcel::$getActiveSheet in C:\PHP\test.php on line 200

Fatal error: Call to a member function fromArray() on null in C:\PHP\test.php on line 200

I don't understand the cause of the error.

PHP Version: 5.6.12
PHPExcel: 1.8
Windows 7 64-bit

Chris.

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>