// PDF ファイルストリームの作成 using FileStream outputStream = new FileStream("SaveMultipleWorkbooksToPDF.pdf", FileMode.Create); // 新規ワークブックの作成 var workbook = new GrapeCity.Documents.Excel.Workbook(); Stream fileStream = this.GetResourceStream("xlsx\\Any year calendar1.xlsx"); workbook.Open(fileStream); GrapeCity.Documents.Excel.Workbook workbook2 = new GrapeCity.Documents.Excel.Workbook(); Stream fileStream2 = this.GetResourceStream("xlsx\\Any year calendar (Ion theme)1.xlsx"); workbook2.Open(fileStream2); // プリントマネージャーの作成 GrapeCity.Documents.Excel.PrintManager printManager = new GrapeCity.Documents.Excel.PrintManager(); // workbook1とworkbook2を単一のPDFファイルに保存 printManager.SavePDF(outputStream, workbook, workbook2);
' PDF ファイルストリームの作成 Dim outputStream = File.Create("SaveMultipleWorkbooksToPDF.pdf") ' 新規ワークブックの作成 Dim workbook As New Workbook Dim fileStream As Stream = GetResourceStream("Any year calendar1.xlsx") workbook.Open(fileStream) Dim workbook2 As New Excel.Workbook Dim fileStream2 As Stream = GetResourceStream("Any year calendar (Ion theme)1.xlsx") workbook2.Open(fileStream2) ' プリントマネージャーの作成 Dim printManager As New Excel.PrintManager ' workbook1とworkbook2を単一のPDFファイルに保存 printManager.SavePDF(outputStream, workbook, workbook2)