 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Brian Lonnon Guest
|
Posted: Fri Oct 20, 2006 1:24 am Post subject: BCB6, Excel 2003 automation |
|
|
Hi,
I need to be able to open Excel 2003 from my app, load a .xls file and save
it as an xml file. The first two parts I can do, but I can't save the file
AS in xml spreadsheet format. Can anyone help please?
Variant excel;
excel.OlePropertySet("Visible", false);
Variant book = excel.OlePropertyGet("Workbooks");
book.OleFunction("Open", OpenDialog2->FileName.c_str());
Variant application = excel.OlePropertyGet("Application");
book = excel.OlePropertyGet("Workbooks", 1);
//problems with these 2 lines
book.OlePropertySet("SaveAsType", "xlXMLSpreadsheet");
book.OleFunction("SaveAs","c:\\text1.xml");
book.OleFunction("Close");
excel.OleFunction("Quit");
Thanks
Brian |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|