
Try this library http://phpexcel.codeplex.com/ Personally I would not go the route of automating excel, especially for heavy and repeated use. 1. Was not designed for that 2. Requires Excel running on the web server 3. Requires a windows web server 4. Will consume memory like you would not believe 5. If anything goes wrong the process will just hang waiting for someone to click on a message box On Thu, Mar 15, 2012 at 12:16 PM, Isaac Kimotho <izakimotho@gmail.com>wrote:
i have used the com code as follows <pre> <?PHP //variables $filename = "excells.xls"; $sheet1 = 1; $sheet2 = "sheet2"; //create new com $excel_app = new COM("Excel.application") or Die ("Did not connect"); print "Application name: {$excel_app->Application->value}\n" ; print "Loaded version: {$excel_app->Application->version}\n"; //open workbook $Workbook = $excel_app->Workbooks->Open("$filename") or Die("Did not open $filename $Workbook"); $Worksheet = $Workbook->Worksheets($sheet1); $Worksheet->activate; $excel_cell = $Worksheet->Range("C4"); $excel_cell->activate; $excel_result = $excel_cell->value; //print values or insert in bd print "$excel_result\n"; $Worksheet = $Workbook->Worksheets($sheet2); $Worksheet->activate; $excel_cell = $Worksheet->Range("C4"); $excel_cell->activate; $excel_result = $excel_cell->value; print "$excel_result\n"; #To close all instances of excel: $Workbook->Close; unset($Worksheet); unset($Workbook); $excel_app->Workbooks->Close(); $excel_app->Quit(); unset($excel_app); ?> </pre>
am encountering an error. wanted where a user can directly import an excell document without changing to xml spreedsheet format. help.. _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke