ExcelをPDFに変換する際のOffice Add Insのレンダリング
Contents
[
Hide
]
可能な使用シナリオ
以前は、Aspose.CellsはExcelファイルをPDF形式で保存する際にOffice Add-Insをレンダリングできませんでした。現在は問題ありません。特別なメソッドやプロパティを使用する必要はありません。ExcelファイルをPDF形式に保存するだけでOffice Add-Insがレンダリングされます。
ExcelをPDFに変換する際のOffice Add-Insのレンダリング
次のサンプルコードは、Officeアドインが含まれるサンプルExcelファイルを保存します。以前のバージョン(17.11など)で生成された出力PDF(60489770.pdf)は空白ですが、新しいバージョン(17.12以降)で生成された出力PDF(60489771.pdf)はOfficeアドインが表示されます。
サンプルコード
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-.NET | |
//Load the sample Excel file containing Office Add-Ins | |
Workbook wb = new Workbook("sampleRenderOfficeAdd-Ins.xlsx"); | |
//Save it to Pdf format | |
wb.Save("output-" + CellsHelper.GetVersion() + ".pdf"); |