【问题标题】:Programmatically Save an Excel File Using OLE使用 OLE 以编程方式保存 Excel 文件
【发布时间】:2010-06-23 23:06:02
【问题描述】:

如何使用 OLE 和 C++ Builder 以编程方式保存 Excel 工作簿?

我猜可能是这样的:

Variant excel = Variant::CreateObject("Excel.Application");
excel.OleProcedure("Save"); // but how might you specify the file name

【问题讨论】:

    标签: c++ excel c++builder ole


    【解决方案1】:

    哦刚刚从here找到答案:

    excel.OlePropertyGet(”Workbooks”).OlePropertyGet(”Item”,1).OleProcedure(”SaveAs”,”d:\\case1.xls”);
    

    首先您获得工作簿对象,然后是工作簿。然后你可以做一个另存为。

    【讨论】:

      猜你喜欢
      • 2016-03-07
      • 2015-02-17
      • 2021-08-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多