Problem with Excel export

Discussion in 'ASP .Net' started by =?Utf-8?B?a2lzaG9y?=, Jul 20, 2006.

  1. Hi,
    I have follwing code. this code is work sometimes and some time doesnot work.

    There is no error mesg and many times only one instance is allowed.
    does any one faced this problem ?


    Kishor



    Response.Clear()
    Response.ClearContent()
    Response.ClearHeaders()
    Response.Buffer = True
    Response.ContentType = "application/vnd.ms-excel"
    Response.Charset = ""
    Response.Cache.SetCacheability(HttpCacheability.NoCache)
    Dim oStringWriter As New System.IO.StringWriter
    Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)

    dg.RenderControl(oHtmlTextWriter)
    Response.Write(oStringWriter.ToString())
    Response.Flush()
    Response.Close()
    Response.End()
    =?Utf-8?B?a2lzaG9y?=, Jul 20, 2006
    #1
    1. Advertising

  2. Sonu Kapoor [MVP], Jul 20, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?a2lzaG9y?=

    tfsmag Guest

    since the problem is not constant I'm going to say that the fault may
    lie with the browser you're using? Sometimes if your temporary internet
    files are full it will cause document rendering to fail because it has
    no room to put the temp file that is created when opening a document
    directly from the web. try clearing your temporary internet files and
    see if that helps.



    Sonu Kapoor [MVP] wrote:
    > I would probably use XML to export the data to Excel, but in that case you would require Office 2003. Besides that the file will be bigger. You might want to take a loo at:
    >
    > http://dotnetslackers.com/community/blogs/dsmyth/archive/2006/07/14/191.aspx
    >
    > Hth
    >
    > Sonu Kapoor
    >
    >
    > ---
    > Posted via www.DotNetSlackers.com
    tfsmag, Jul 20, 2006
    #3
    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. =?Utf-8?B?RGF2aWQgVmFsbGU=?=

    Invalid export DLL or export format

    =?Utf-8?B?RGF2aWQgVmFsbGU=?=, Oct 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    3,614
    =?Utf-8?B?RGF2aWQgVmFsbGU=?=
    Oct 29, 2003
  2. =?Utf-8?B?U3JpZGhhcg==?=

    using Microsoft Excel image for Export to Excel button

    =?Utf-8?B?U3JpZGhhcg==?=, Dec 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,098
    =?Utf-8?B?U3JpZGhhcg==?=
    Dec 9, 2005
  3. =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=

    Export to Excel (Default File Type - Excel)

    =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=, Apr 24, 2006, in forum: ASP .Net
    Replies:
    15
    Views:
    17,511
    syed hassan
    May 21, 2009
  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,495
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  5. Grey
    Replies:
    4
    Views:
    1,965
    Mark Rae [MVP]
    Oct 17, 2007
Loading...

Share This Page