Exporting to Excel

Discussion in 'ASP General' started by bcap, Oct 11, 2007.

  1. bcap

    bcap Guest

    Hi,

    I am using the following code to export to Excel:

    fn = "QUERYRESULTS.xls"
    Response.Buffer = TRUE
    Response.ContentType = "application/vnd.ms-excel"
    Response.AddHeader "Content-Disposition","attachment;filename=" & fn
    Response.AddHeader "Content-Disposition","filename=D:\results.xls"

    'Response.Buffer = True
    'Response.ContentType = "application/word"
    'Response.AddHeader "content-disposition", "inline; filename =
    ASP_Word_Doc.doc"



    However, when it opens in Excel, you will need to modify Excel in
    order to be able to print on one page. Is there any way to set the
    printing during this process so users do not have to do this each time
    they want to print? Or is their another method of doing this that
    would work better?

    Thank yoU!!!!!!!!!!!!!!!!!!!!!!
    bcap, Oct 11, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravindra
    Replies:
    0
    Views:
    763
    Ravindra
    Dec 14, 2005
  2. Marshal Antony

    Re: Exporting to Excel using CSS

    Marshal Antony, Jan 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    428
  3. Luis Esteban Valencia
    Replies:
    1
    Views:
    1,371
    Carl Prothman [MVP]
    Jan 12, 2005
  4. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,486
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  5. Doogie
    Replies:
    1
    Views:
    443
    sloan
    Nov 19, 2008
Loading...

Share This Page