473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Export to Excel problem

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 '07 #1
9 2004
<rw*****@iastate.eduwrote in message
news:11**********************@z28g2000prd.googlegr oups.com...
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

Jun 13 '07 #2
On Jun 13, 10:37 am, "Mark Rae" <m...@markNOSPAMrae.netwrote:
<rwie...@iastate.eduwrote in message

news:11**********************@z28g2000prd.googlegr oups.com...
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 '07 #3
<rw*****@iastate.eduwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
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

Jun 13 '07 #4
Get him Mark. . .:)

http://www.google.com/search?hl=en&q...+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" <ma**@markNOSPAMrae.netwrote in message
news:ez**************@TK2MSFTNGP04.phx.gbl...
<rw*****@iastate.eduwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
>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

Jun 13 '07 #5
>
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 '07 #6
<rw*****@iastate.eduwrote in message
news:11**********************@i38g2000prf.googlegr oups.com...
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

Jun 13 '07 #7
On Jun 13, 5:24 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
<rwie...@iastate.eduwrote in message

news:11**********************@i38g2000prf.googlegr oups.com...
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 '07 #8
<rw*****@iastate.eduwrote in message
news:11*********************@d30g2000prg.googlegro ups.com...
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

Jun 13 '07 #9
On Jun 13, 5:44 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
<rwie...@iastate.eduwrote in message

news:11*********************@d30g2000prg.googlegro ups.com...
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 13 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel...
7
by: Keon | last post by:
Hoi, I'm using a database with alot of records in 1 table (more than 3000). If i want to export this table to excel i only get it till record 2385. Do someone know how i can solve this...
2
by: Regnab | last post by:
I've got my code working so that it'll count the number of columns in the table and move across (eg Range A-P and then range Q-W). Problem is when I get to the end of the single letters and get...
2
by: Siu | last post by:
Hi, I use the following code to export and import a file Excel from resp. into a Web page with the following code: //EXPORT Response.Clear(); Response.Buffer = true; Response.ContentType =...
3
by: Bidarkota | last post by:
When i export DataGrid to Excel all the HTML contents are also exporting to excel. i am using stylesheets in the ASPX Page and i am getting an alert message that stylesheets are missing. i need to...
3
by: Marja Ribbers-de Vroed | last post by:
Hi, One of my clients has a strange problem with my webapplication which I think may be related to some firewall setting on his computer. On several screens in the application, it is possible...
3
by: =?Utf-8?B?bWFuaWthMDI=?= | last post by:
Hi, I have a GridView control in page called eventslisting which is inheriting from a MasterPage. The normal code to export to GridView does not work and gives me an error - "Control of type...
1
by: JawzX01 | last post by:
Hello All, First, thank you for any help you can provide. I'm trying to do a simple export to excel. I've used the classic code that is all over the internet, and of course it worked without a...
0
by: mustaqueahmad | last post by:
Hi All, I am getting export to excel problem when I am giving IPAddress in URL, but it is working correct when am giving localhost and page name. eg : when I am writing My machine IP...
2
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.