SqlDbx Forum

SqlDbx

You are not logged in.

#1 2013-01-22 02:10:15

hoarder
Member

Export to Excel - Failure

When the results are exported to Excel is there a way to ensure text columns are exported as text and not treated as a number.

For example the text value "N0014925000/23640-" fails when exporting to Excel. It produces a 0x800A03EC error.

I believe that Excel is trying to treat the value as a number instead of a character string.

Offline

#2 2013-01-22 14:08:50

sqldbxhelp
Administrator

Re: Export to Excel - Failure

I do not think "N0014925000/23640-" is a problem.
You can try two other available Excel export options:
Excel (as text, smart)
Exce (as displayed)

Offline

#3 2013-01-31 01:01:59

hoarder
Member

Re: Export to Excel - Failure

Hi, "N0014925000/23640-" IS a problem. I isolated the issue down to this text in the returned data and it failed using both options you indicated. If I exlcude the column that has this value then the Excel functions work.

Offline

#4 2013-01-31 11:54:07

sqldbxhelp
Administrator

Re: Export to Excel - Failure

I cannot reproduce this.
Are you saying if you execute SELECT "N0014925000/23640-" and then try to export to Excel it will fail?
What version of Excel are you using? What locale?

Offline

#5 2013-01-31 13:10:23

maac2002
Member

Re: Export to Excel - Failure

I can confirm that "N0014925000/23640-" is NOT a problem,
at the moment of exporting, at least not with SQL
(versions 2000->2008).
Regards

Last edited by maac2002 (2013-01-31 13:10:40)

Offline

#6 2013-01-31 20:42:12

hoarder
Member

Re: Export to Excel - Failure

Apologies, I have retested during which I found out a mistake (assumption) I made (I selected a column the result set and select export to excel from the context menu - thinking it would export the highlighted columns. Unfortunately it doesn't do this.)

Anyway - the column that causes the error condition is a varchar2 column that has a 987 character field with 10 embedded carriage return/line feed combinations. You can copy and paste the contents into an excel cell, however the Export function falls over with the indicated error in the first post I made.

fyi this is interacting with Excel 2003.

Offline

Board footer

Powered by FluxBB