dbTalk Databases Forums  

SQL output to EXCEL

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss SQL output to EXCEL in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
clayton
 
Posts: n/a

Default SQL output to EXCEL - 11-24-2009 , 07:46 PM






Instead of building code from an open record set for output
to a CSV file format I am trying to EXECUTE an SQL statement
using built in. I just tried to use to test in dbisql
select * from incidents;
OUTPUT TO test.txt
FORMAT EXCEL

Says Excel is invalid. I tried XML, and HTML with same
results. What am I missing? My version is 8.0.3:5002
Windows

Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: SQL output to EXCEL - 11-25-2009 , 12:47 PM






Funny, since it works for me with 8.0.3#5576 and
I have no recollection of that being broken in any
8.0.x release.

I do get an Invalid Format error if I use the dbisqlC
utility (provided mostly for backward compatability)
and that may be your issue. Using the Java one instead
would remedy that.



"clayton" wrote in message news:4b0c8c87.3c69.1681692777 (AT) sybase (DOT) com...
Quote:
Instead of building code from an open record set for output
to a CSV file format I am trying to EXECUTE an SQL statement
using built in. I just tried to use to test in dbisql
select * from incidents;
OUTPUT TO test.txt
FORMAT EXCEL

Says Excel is invalid. I tried XML, and HTML with same
results. What am I missing? My version is 8.0.3:5002
Windows

Reply With Quote
  #3  
Old   
Rachan Terrell
 
Posts: n/a

Default Re: SQL output to EXCEL - 12-02-2009 , 02:18 PM



You could try this:

select *
from SomeTableName;
output to c:\AnyFileName.xls format html;
commit;

Open the file using Excel and it will work.

Best regards,
Rachan Terrell


<clayton> wrote

Quote:
Instead of building code from an open record set for output
to a CSV file format I am trying to EXECUTE an SQL statement
using built in. I just tried to use to test in dbisql
select * from incidents;
OUTPUT TO test.txt
FORMAT EXCEL

Says Excel is invalid. I tried XML, and HTML with same
results. What am I missing? My version is 8.0.3:5002
Windows

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.