Hi Olaf,
Use Mustaka solution, it works very well.
CALL METHOD OF h_excel 'ExecuteExcel4Macro'
EXPORTING #1 = 'PAGE.SETUP(,,,,,,,,,,,,{1,1})'.
What the above code does is " You are creating a Macro for Excel from SAP with the options provided"
The best way is to check. Open Excel, I am talking about MS Excel 2010
On the View Tab you will find a Macros button
Click on that button
From the Drop down you will find a option called " Record Macro" Click on it and then Record the Options on Page Layout.
Now compare the above mentioned Call method Parameters with recording. On the recording Zoom shows as FALSE dont get confuse. in the EXPORTING PARAMETER, we are passing blank to Zoom and which is mentioned below comparing to Macro Recording.
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.PrintHeadings = False
.PrintGridlines = False
.CenterHorizontally = False
.CenterVertically = False
.Draft = False
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
Count the commas (,) from the above code, 12th one is for the Zoom. You compare it with the Macro Recording like this.
The above code should work perfectly. Just copy paste thats it.
Hope this helps