Passing formatting variables when creating XLS from web

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.
 
F

FSt1

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top