tags:

views:

25

answers:

1

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
A: 

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.

Seth