开发者

Programmatically Save an Excel File Using OLE

开发者 https://www.devze.com 2023-01-04 08:30 出处:网络
How do you programmatically save an excel workbook using 开发者_开发百科OLE and C++ Builder? I\'m guessing it might be something like:

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

精彩评论

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