I have used your template file with code segment, the print preview of the output file is fine. I don't find any issue, I am using MS Excel 2007 (Office Professional Plus Edition 2007) on my pc.
"Note: The normalized file is working fine (can see print preview properly) in Microsoft Office Ultimate 2007.
I am using Microsoft Office Professional Plus 2007 v12.0.4518.1014 and the print preview is just fine.
Is it possible that you are using different file in Print preview in MS Excel, please make sure that you are using the generated file from “KEY00148286.XLS” utilizing your sample code, e.g
for (int inti = 0; inti < oExcelBook.Worksheets.Count; inti++)
Worksheet oExcelSheet = oExcelBook.Worksheets[inti];
oExcelSheet.PageSetup.Orientation = PageOrientationType.Landscape;
oExcelSheet.PageSetup.Zoom = 100;
I am also attaching my output file, could you open your MS Excel to take the print preview if it is fine.