读取由Apple Inc.开发的Numbers电子表格

可能的使用场景

Numbers是由Apple Inc.开发的电子表格应用程序。Aspose.Cells可以读取Numbers电子表格,但不支持对其进行写入。它可以读取Numbers电子表格的数据、样式和公式。

使用 Aspose.Cells 读取由 Apple Inc. 开发的 Numbers 电子表格

以下示例代码加载Sample Numbers Spreadsheet并将其转换为Output PDF Format。您需要使用**LoadOptions**类,并在其构造函数中指定**LoadFormat::Numbers**参数才能成功加载它。请从给定链接下载它们两个。您可以尝试使用任何Numbers电子表格来运行代码。请还阅读代码的注释以获取更多帮助。

示例代码

Aspose::Cells::Startup();
// The path to the documents directory.
U16String dataDir = u"";
//Specify load options, we want to load Numbers spreadsheet
LoadOptions opts(LoadFormat::Numbers);
//Load the Numbers spreadsheet in workbook with above load options
Workbook wb(dataDir + u"sampleNumbersByAppleInc.numbers", opts);
//Save the workbook to pdf format
wb.Save(dataDir + u"outputNumbersByAppleInc.pdf", SaveFormat::Pdf);
Aspose::Cells::Cleanup();