读取由Apple Inc.开发的Numbers电子表格
Contents
[
Hide
]
可能的使用场景
Numbers是由Apple Inc.开发的电子表格应用程序。Aspose.Cells可以读取Numbers电子表格,但不支持对其进行写入。它可以读取Numbers电子表格的数据、样式和公式。
使用 Aspose.Cells 读取由 Apple Inc. 开发的 Numbers 电子表格
以下示例代码加载了Apple Inc.示例数字电子表格,并将其转换为输出PDF格式。您将需要使用LoadOptions类,并在其构造函数中指定*LoadFormat.NUMBERS作为参数才能成功加载它。请从给定的链接下载这两个文件。您可以尝试使用任何数字电子表格来运行代码。还请阅读代码中的注释以获得更多帮助。
示例代码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Specify load options, we want to load Numbers spreadsheet. | |
LoadOptions opts = new LoadOptions(LoadFormat.NUMBERS); | |
// Load the Numbers spreadsheet in workbook with above load options. | |
Workbook wb = new Workbook(srcDir + "sampleNumbersByAppleInc.numbers", opts); | |
// Save the workbook to pdf format | |
wb.save(outDir + "outputNumbersByAppleInc.pdf", SaveFormat.PDF); |