开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜