Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Smile Unanswered: Automatically Saving An Excel File

    Hi,

    I am using the follwoing code for generating an Excel file

    Code:
    HttpContext.Current.Response.Clear()
                HttpContext.Current.Response.ClearContent()
                HttpContext.Current.Response.ClearHeaders()
                HttpContext.Current.Response.Charset = ""
                HttpContext.Current.Response.Buffer = True
                HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
                HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + lstrExcelFileName)
    
                HttpContext.Current.Response.Write(_strBuild)
    
                HttpContext.Current.Response.Flush()
    
                HttpContext.Current.Response.End()
    the above code works well,but it is prompting the user for saving an excel file.
    I dont want that . Is there any mechanism for saving an excel file with out prompting the user

  2. #2
    Join Date
    Aug 2011
    Posts
    2

    Smile Automatic Saving an Excel File

    May I Know whether it is possible or not

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You cannot force files onto a user's computer through a browser without their knowledge.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •