ODBC export to Excel Spreadsheet, how to force format

Windows specific forum
tony
User
User
Posts: 26
Joined: Thu May 01, 2003 1:35 am
Location: California
Contact:

ODBC export to Excel Spreadsheet, how to force format

Post by tony »

Hello everyone,

I have a program that export data to an excel spreadsheet using the ODBC library in PureBasic. Most of the code comes from:

viewtopic.php?t=6072&highlight=excel+odbc

I just have one little problem. I export numbers, and they are not recognized as a string. Do you know how to specify the format in the SQL query string?

Thanks,
Thank God It's Friday!
Tony
tony
User
User
Posts: 26
Joined: Thu May 01, 2003 1:35 am
Location: California
Contact:

Post by tony »

oldefoxx
Enthusiast
Enthusiast
Posts: 532
Joined: Fri Jul 25, 2003 11:24 pm

Post by oldefoxx »

Excel Cells default to a General form, which means that if it sees something that looks like a number, it treat it like a number, and if it looks like a date, it will treat it like a date, and so on.

I suspect that you need to select the column that you want to have treated like a string and tell Excel to treat everything as a Text. Then it will not try to convert it into something else. :wink:
has-been wanna-be (You may not agree with what I say, but it will make you think).
Post Reply