Opening Excel With VB.NET -- Garbage Data Returned


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Opening Excel With VB.NET -- Garbage Data Returned

  1. #1
    Join Date
    Jun 2006
    Posts
    3

    Question Opening Excel With VB.NET -- Garbage Data Returned

    After hours of searching , I can only find posts that tell me I'm coding this situation correctly . I'm looking for more eyes to review this code!

    My Code:

    Response.ClearContent()
    Response.ClearHeaders()
    Response.ContentType = "application/vnd.ms-excel"
    Response.ContentEncoding = System.Text.Encoding.UTF7
    Response.Charset = ""
    Response.AddHeader("content-disposition","inline;filename=" + sFileName)
    Response.WriteFile(sFilePath & sFileName)
    Response.Flush()
    Response.End()

    Expected Results:

    I expect IE to prompt the user to save/open the .xls file with Excel!

    Actual Results:

    ࡱ>  L\p Ba==x@7 Oh+'0@HT` x   Microsoft Excel@oϋ@E.՜.+,0 PXd lt| *AIM Report For 12-Jun-06  Worksheets  Root Entry FWorkbookSummaryInformation( DocumentSummaryInformation8

  2. #2
    Join Date
    Jun 2006
    Posts
    3
    /bump

  3. #3
    Join Date
    Jun 2006
    Posts
    3

    Exclamation Still Need Help!

    /bump

    Still Need Help!

Similar Threads

  1. Export to excel data from Datagrid rows
    By sunilmskr in forum .NET
    Replies: 0
    Last Post: 06-13-2005, 03:40 AM
  2. Formatting excel data returned from an asp
    By Terry in forum ASP.NET
    Replies: 4
    Last Post: 08-15-2002, 04:08 PM
  3. Problem with Excel data
    By Willis in forum Database
    Replies: 6
    Last Post: 06-12-2002, 04:27 PM
  4. Retrieving Excel data
    By Cedric Thirion in forum VB Classic
    Replies: 0
    Last Post: 04-13-2000, 11:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center