作成日: 2023/08/03 最終更新日: 2023/08/03
文書種別
使用方法
詳細
PdfSaveOptionsクラスやPrintOutOptionsクラスのPagePrinting/PagePrintedイベントハンドラを実装するコードをご紹介します。
using GrapeCity.Documents.Excel; ・・・ static void Main(string[] args) { var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; worksheet.Range["A1:A500"].Value = "test"; PrintOutOptions options = new PrintOutOptions(); options.PagePrinting += Options_PagePrinting; options.PagePrinted += Options_PagePrinted; workbook.PrintOut(options); } private static void Options_PagePrinted(object sender, PagePrintedEventArgs e) { Console.WriteLine("Options_PagePrinted"); } private static void Options_PagePrinting(object sender, PagePrintingEventArgs e) { Console.WriteLine("Options_PagePrinting"); }