Free Support Forum - aspose.com

Format Landscape

Laurence -

Is there a way I can format a page to come out Landscape instead of Portrait?

Also, Say I have 5 columns, I would like to autofit the columns so they can see the text in that column when the page first opens up. Right now, it sometimes doesn’t expand the columns to the full width.

Any help you can give me is always appreciated.

Steven

Hi Steven,

To format a page to Landscape, please try:

excel.Worksheet[0].PageSetup.Orientation = PageOrientationType.Landscape;

To autofit column A, please try:

excel.Worksheet[0].AutoFitColumn(0);