From: Robert Hostetter <robert.hostetter@gm...> - 2004-11-16 16:59:32
I'm trying to use the jexcelapi http://www.andykhan.com/jexcelapi/ .
The java code to create a work books looks like this
Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
Here is my PHP version
$fname1 = tempnam("/tmp", "demo.xls");
$file = new java("java.io.File", $fname1);
$workbookStatic = new java("jxl.write.Workbook");
$workbook = $workbookStatic.createWorkbook($file);
and here is my output
Warning: java.lang.NullPointerException in
on line 14
Fatal error: Call to undefined function: createworkbook() in
on line 16
FYI line 14 is $workbookStatic = new java("jxl.write.Workbook");
I can't figure out how to run the static function createworkbook. If
anyone has any tips I'd really appreciate it.
On Tue, 2004-11-16 at 17:59, Robert Hostetter wrote:
> $workbook = $workbookStatic.createWorkbook($file);
Shouldn't this be
The . has a different meaning in PHP, the above code will cause PHP to
look for createWorkbook in the global scope and then append the result
to the object $workbookStatic.
Does this help?
Get latest updates about Open Source Projects, Conferences and News.