Archive for December 18th, 2011

Excel poisoning #10: fit print area in one page

December 18, 2011

In previous posts we added a new chart to current worksheet, what if we want to print the whole area only in one page ?

myWorksheet.PageSetup.PrintArea = rangeDataAndChart.Address;
myWorksheet.PageSetup.Orientation = XlPageOrientation.xlLandscape;
myWorksheet.PageSetup.Zoom = false;

Thank you to EnricoG for zoom tip. 😉

Technorati tags: Excel, Csharp