Apple Inc. が開発したNumbersスプレッドシートの読み取り

可能な使用シナリオ

NumbersはApple Inc.によって開発されたスプレッドシートアプリケーションですが、Aspose.CellsはNumbersスプレッドシートの読み取りをサポートしていますが、書き込みはサポートしていません。Numbersスプレッドシートのデータ、スタイル、および数式を読み取ることができます。

Aspose.Cellsを使用してApple Inc.が開発したNumbersスプレッドシートを読む

次のサンプルコードは、Apple Inc.からのサンプルNumbersスプレッドシートを読み込んで、出力PDF形式に変換する方法を示しています。読み込みに成功するためには、LoadOptionsクラスを使用し、そのコンストラクタのパラメータにLoadFormat.Numbersを指定する必要があります。提供されたリンクからそれぞれをダウンロードしてください。任意のNumbersスプレッドシートでコードを試すことができます。詳しい説明については、コードのコメントもご覧ください。

サンプルコード

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
//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(sourceDir + "sampleNumbersByAppleInc.numbers", opts);
//Save the workbook to pdf format
wb.Save(outputDir + "outputNumbersByAppleInc.pdf", SaveFormat.Pdf);