Hello,
I would like to be able to change the export to Excel report orientation.
After reviewing the forums, I believe the code should be:
xlSheet.PageSetup.Orientation := 2; //1:Portrait, 2:Landscape
But where does that bit of code go? I'm using the Excel Buffer. I tried adding it to the CreateExcelbook function, but it is not right. Do I need to set up xlsheet as a variable, if so, what type of variable?
CreateExcelbook()
ExcelBuf.CreateBook;
ExcelBuf.CreateSheet('Items','Unit Sales Report',COMPANYNAME,USERID);
ExcelBuf.xlSheet.PageSetup.Orientation := 2;
ExcelBuf.GiveUserControl;
ERROR('');
Thank you.
JNM
Comments
Be aware that this is part of the pagesetup class. That means if a client does not have a default printer the function can bomb. You can google Microsoft Support for more information on that.
http://www.archerpoint.com/blog/faithie-robertson
A blog by Faithie Robertson