Apple Inc. が開発したNumbersスプレッドシートの読み取り
可能な使用シナリオ
NumbersはApple Inc.によって開発されたスプレッドシートアプリケーションですが、Aspose.CellsはNumbersスプレッドシートの読み取りをサポートしていますが、書き込みはサポートしていません。Numbersスプレッドシートのデータ、スタイル、および数式を読み取ることができます。
Aspose.Cellsを使用してApple Inc.が開発したNumbersスプレッドシートを読む
次のサンプルコードはサンプルナンバースプレッドシートをロードし、出力PDF形式に変換します。正常にロードするには、**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(); |