We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Setting Print Style via code

Is it possible to cycle through the worksheets in my workbook and set the print style to double and single sided as I need?

I have a muli-sheet workbook now (that gets created via Aspose.Cells for .NET), and if I take the time to set certain sheets to be single sided (after it is generated), everything works great.

However - I tried setting the print style on the indiviudual templates before they are combined. When they get merged into one workbook - those settings get re-defaulted back to double sided.

How can I use pageoptions (or whateve is appropriate) to set the print style on a worksheet by worksheet basis?



This message was posted using Page2Forum from PageSetup Property - Aspose.Cells for .NET

Hi Rob,

Thanks for your question.

Can you please clarify your requirements/problems with some sample source (xls/xlsx), screenshots and and sample code project. (Anything that is helpful).

You can create sample xls/xlsx files manually in Ms-Excel. I have also logged your posting in our database. We will update you asap.

This issue has been logged as CELLSNET-27403.


Can you explain your requirement/issue more as Shakeel Faiz asked you to do.
<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}


Please post your template files (that should be single-sided and double-sided), we will check them soon.
Thank you.

It's not about a template file.

If you open Excel - go to Page Setup and click on Options (after having the printer selected). You will see a finishing tab, with Print Style. From there the user can select 1 sided or 2 sided. I need to programmatically select these on each worksheet.

You can read more about these options from the MS support site. While they are talking about setting it manually - I'd like to set it via Aspose.Cells.



Hi Rob,

Thank you for providing us further details.
I have updated your comments with the Ticket attached to this thread. Although I was unable to find this option in Excel 2010. That is may be cause I do not have any printer installed. I will check this further by installing a printer and will update my comments as well.

Have you been able to make any progress with this?



Hi Rob,

I am afraid, currently we do not have any updates on this issue. But we have asked for ETA. As soon as we receive any news, we will post it here.
Thank you for your patience.


It must be the setting of the printer.

Our printer do not such property,so we could not create a template file to check whether the setting will be stored in the file.

Could you create a template file: one worksheet contains double sided setting, one worksheet contains one sided setting.

We will check the file soon.