Hi Guys, i have an awful problem to solve..
Simply i need to save a file .xls to a file in csv ( or txt, or whatever..) using COM.
Well, i have found a lot of documentation, the most valid for asp and visual c programmers...
Anyway, with something like:
$excel=new COM("Excel.Application") or die("Unable to instantiate Excel");
$excel->application->Workbooks->Open("c:\php\foo.xls");
$excel->Application->ActiveWorkbook->SaveAs("c:\php\bar.xls");
i can open the file c:\foo.xls and save it as c:\bar.xls, but i can't figure out how to specify the format of the file (csv, or txt, or xml..)
This is an example in asp (i think..)
ThisApplication.ActiveWorkbook.SaveAs("C:\MyWorkbook.xml", _FileFormat:=Excel.XlFileFormat.xlXMLSpreadsheet)
and this is in visual c:
ThisApplication.ActiveWorkbook.SaveAs("c:\MyWorkbook.xml",
Excel.XlFileFormat.xlXMLSpreadsheet, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
for obvious reasons i cannot find an example in php on microsoft web site!
Would you please help me to solve this - apparently simple - task?
Thanks, Paolo Dina
P.S.: just for thoroughness, i'm using cgi version of php 4.3.3