Excel Print Setup
The Excel Print Setup feature in IronXL allows developers to easily configure print settings for Excel worksheets before printing or saving them. This feature is particularly useful when generating reports, invoices, or documents that need specific formatting for printing. Developers can set custom headers and footers to include dynamic content like page numbers, titles, and other details, ensuring a professional output. The PrintSetup options also allow fine-tuning of print margins, paper size, and orientation, making it possible to adapt the document for various printers and paper types.
IronXL gives developers full control over how the printed document will appear with the ability to specify paper sizes such as B4, A4, or letter sizes, as well as orientation options (portrait or landscape). Additionally, the ability to switch to black-and-white printing or disable color adds flexibility, especially for cost-effective printing scenarios. This feature streamlines the process of preparing Excel files for high-quality printed output.
How to use Excel NumberFormat
in C#
var workBook = WorkBook.Load("sample.xlsx");
var workSheet = workBook.DefaultWorkSheet;
workSheet.Header.Center = "My Document";
workSheet.PrintSetup.PaperSize = PaperSize.B4;
workSheet.PrintSetup.PrintOrientation = PrintOrientation.Portrait;
workBook.Save();
Discover How to Manage Excel Worksheets with Ease in C# - Read More!