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 for Python via .NET.
This article shows how to create a console application in Visual Studio.Net, and apply page setup and printing options to a worksheet with a few simple lines of code using the Aspose.Cells for Python via .NET API.
For this example, we created a workbook in Microsoft Excel and use Aspose.Cells for Python via .NET 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. |
|---|
![]() |
| Default page setup options. |
|---|
![]() |
Page 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 |
|---|
![]() |
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.