Page 1 of 1

ODBC export to Excel Spreadsheet, how to force format

Posted: Sat Jul 19, 2003 2:32 am
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

Posted: Sat Jul 19, 2003 5:30 am
by tony

Posted: Fri Jul 25, 2003 11:48 pm
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: