Passing formatting variables when creating XLS from web

  • Thread starter Thread starter michael.harris
  • Start date Start date
M

michael.harris

Hi, I'm currently allowing my users to export content from an online
DB accessible from our Intranet into excel.

I am wanting to see if it's possible to dictate to Excel by passing a
variable to define the page scaling so the resulting xls file is
formatted to fit the printed content a single page?

Any answers to this would be appreciated, as i've spent a bit of time
searching around this morning with no luck.
 
hi,
not sure how you are downloading but code might do what you want.

With Worksheets("Sheet1").PageSetup
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
End With

change to fit your data

regards
FSt1
 
Back
Top