Programmatically Save an Excel File Using OLE
How do you programmatically save an excel workbook using 开发者_开发百科OLE and C++ Builder?
I'm guessing it might be something like:
Variant excel = Variant::CreateObject("Excel.Application");
excel.OleProcedure("Save"); // but how might you specify the file name
Oh just found the answer from here:
excel.OlePropertyGet(”Workbooks”).OlePropertyGet(”Item”,1).OleProcedure(”SaveAs”,”d:\\case1.xls”);
First you get the workbooks object followed by the workbook. Then you can do a SaveAs.
精彩评论