Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Sometimes, developers need to configure page setup and print settings to control the printing process. Page setup and print settings offer various options and are fully supported in Aspose.Cells.
This article shows how to create a console application and apply page setup and printing options to a worksheet with a few simple lines of code using the Aspose.Cells API.
For this example, we created a workbook in Microsoft Excel and use Aspose.Cells to set page setup and print options.
First create a simple worksheet in Microsoft Excel. Then apply page setup options to it. Executing the code changes the Page Setup options as in the screenshot below.
Output file

Open a new workbook in Microsoft Excel.
Add some data. Below is a screenshot of the file.
Input file

Set page setup options: Apply page setup options to the file. Below is a screenshot of the default options, before the new options are applied.
Default page setup options

javac \-classpath %classpath%;e:\Aspose.Cells.jar; ClassName .javajava \-classpath %classpath%;e:\Aspose.Cells.jar; ClassNamePage setup settings also provide several print options (also called sheet options) that allow users to control how worksheet pages are printed. They allow users to:
The example that follows applies print options to the file created in the example above (PageSetup.xls). The screenshot below shows the default print options before new options are applied. Input document

Executing the code changes the print options. Output file

This article shows how to set page setup and sheet print options using Aspose.Cells. Hopefully, it will give you some insight, and you can use these options in your own scenarios.
Aspose.Cells benefits from years of research, design and careful tuning. We heartily welcome your queries, comments and suggestions at Aspose.Cells Forum. We warranty a prompt reply.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.