Document 接口
Document 接口表示管理 Excel 工作簿的主文档对象。
类 (Classes)
全局函数
-
oo::iDocument *load_document(const char *filename)
从文件加载现有文档。
- 参数:
filename -- 要加载的 Excel 文件(含路径)
- 返回:
指向已加载文档的指针,失败返回 nullptr
-
const char *lib_version()
获取库版本字符串。
- 返回:
包含库版本信息的常量字符串
使用示例
#include "oosxl.hxx"
// Create a new document
oo::iDocument* doc = create_document();
if (doc) {
// Get workbook and work with sheets
oo::iWorkbook* workbook = doc->get_workbook();
// Perform operations...
// Save document
doc->save("example.xlsx");
// Clean up
doc->release();
}