Export to Excel problem

Discussion in 'ASP .Net' started by rwiegel@iastate.edu, Jun 13, 2007.

  1. Guest

    I am using the following code to export to excel:

    Response.ContentType = "application/ms-excel";
    Response.AddHeader("Content-Disposition", "inine;filename=text.xls");
    OdbcDataReader reader = cmd.ExecuteReader();

    excelGrid.DataSource = reader;
    excelGrid.DataBind();
    excelGrid.RenderControl(writer);

    On a few rows (3 out of 623), I receive an error that the cell data is
    too large. A log file is created and the data it was trying to insert
    is stored in the log file. The data is all around 980 character (with
    spaces). This seems way to small to be the maximum characters allowed
    in an excel cell.

    Does anybody have any ideas?

    Thanks in advance,

    Ryan
     
    , Jun 13, 2007
    #1
    1. Advertising

  2. Mark Rae Guest

    <> wrote in message
    news:...

    > Does anybody have any ideas?


    1) What is the "exact" error message?

    2) Why are you using ODBC and not OleDb, AAMOI...?


    --
    http://www.markrae.net
     
    Mark Rae, Jun 13, 2007
    #2
    1. Advertising

  3. Guest

    On Jun 13, 10:37 am, "Mark Rae" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > Does anybody have any ideas?

    >
    > 1) What is the "exact" error message?
    >
    > 2) Why are you using ODBC and not OleDb, AAMOI...?
    >
    > --http://www.markrae.net


    Thanks for the reply.

    1) The exact error is: HTML ERROR in Cell data too large

    2) The mailhost claims they only support ODBC
     
    , Jun 13, 2007
    #3
  4. Mark Rae Guest

    <> wrote in message
    news:...

    > Thanks for the reply.
    >
    > 1) The exact error is: HTML ERROR in Cell data too large
    >
    > 2) The mailhost claims they only support ODBC


    The mailhost...? What mailhost...? What are you actually doing here...?
    Which line is generating the error...?


    --
    http://www.markrae.net
     
    Mark Rae, Jun 13, 2007
    #4
  5. Mike Guest

    Get him Mark. . .:)

    http://www.google.com/search?hl=en&q=Export DataGrid to Excel ASP.NET

    theres all kinds of ways to export your datagrid to Excel and even make nice
    and pretty charts.

    Mike
    'IGotYourDotNet'
    http://igotyourdotnet.blogspot.com/




    "Mark Rae" <> wrote in message
    news:...
    > <> wrote in message
    > news:...
    >
    >> Thanks for the reply.
    >>
    >> 1) The exact error is: HTML ERROR in Cell data too large
    >>
    >> 2) The mailhost claims they only support ODBC

    >
    > The mailhost...? What mailhost...? What are you actually doing here...?
    > Which line is generating the error...?
    >
    >
    > --
    > http://www.markrae.net
     
    Mike, Jun 13, 2007
    #5
  6. Guest


    >
    > The mailhost...? What mailhost...? What are you actually doing here...?
    > Which line is generating the error...?
    >
    > --http://www.markrae.net


    The error occurs when opening the excel file....it is an excel error
    and is not caught in as an exception in the code. Its not a problem
    with ODBC because all of the data gets populated fine in the datagrid,
    the only problem is when it gets exported to excel. Somebody told me
    that excel can hold up to 32,000 characters, but can only display 1024
    in the formula bar. How can I check if the data is there? And is it
    usable?
     
    , Jun 13, 2007
    #6
  7. Mark Rae Guest

    <> wrote in message
    news:...

    > but can only display 1024 in the formula bar.


    That's correct:
    http://support.microsoft.com/kb/211580

    > How can I check if the data is there?

    I don't think you can through the standard worksheet - it's probably
    available to functions and VBA, though...

    > And is it usable?

    Depends what you want to use it for...

    And I still don't know why you're using ODBC... :)

    Or what "mailhost" is, or what it has to do with this...


    --
    http://www.markrae.net
     
    Mark Rae, Jun 13, 2007
    #7
  8. Guest

    On Jun 13, 5:24 pm, "Mark Rae" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > but can only display 1024 in the formula bar.

    >
    > That's correct:http://support.microsoft.com/kb/211580
    >
    > > How can I check if the data is there?

    >
    > I don't think you can through the standard worksheet - it's probably
    > available to functions and VBA, though...
    >
    > > And is it usable?

    >
    > Depends what you want to use it for...
    >
    > And I still don't know why you're using ODBC... :)
    >
    > Or what "mailhost" is, or what it has to do with this...
    >
    > --http://www.markrae.net


    sorry i didn't mean mailhost i meant webhost

    I believe my client wants to be able to do keyword searches on the
    data in the excel.....can it still find data that can't be displayed?
     
    , Jun 13, 2007
    #8
  9. Mark Rae Guest

    <> wrote in message
    news:...

    > sorry i didn't mean mailhost i meant webhost


    LOL! OK, but I *STILL* don't know why you're using ODBC... :)

    > I believe my client wants to be able to do keyword searches on the
    > data in the excel.....can it still find data that can't be displayed?


    This clearly isn't an ASP.NET question - I suggest you post a message in the
    Excel newsgroup...


    --
    http://www.markrae.net
     
    Mark Rae, Jun 13, 2007
    #9
  10. Guest

    On Jun 13, 5:44 pm, "Mark Rae" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > sorry i didn't mean mailhost i meant webhost

    >
    > LOL! OK, but I *STILL* don't know why you're using ODBC... :)
    >
    > > I believe my client wants to be able to do keyword searches on the
    > > data in the excel.....can it still find data that can't be displayed?

    >
    > This clearly isn't an ASP.NET question - I suggest you post a message in the
    > Excel newsgroup...
    >
    > --http://www.markrae.net


    ok thanks for your help
     
    , Jun 14, 2007
    #10
    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,665
    =?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,159
    =?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,656
    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,597
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  5. Grey
    Replies:
    4
    Views:
    2,108
    Mark Rae [MVP]
    Oct 17, 2007
Loading...

Share This Page