csv output

Bill Campbell bill at celestial.com
Fri Feb 27 10:58:29 PST 2009


On Fri, Feb 27, 2009, Fairlight wrote:
>With neither thought nor caution, Richard Kreiss blurted:
>> Have a small problem and I am sure one of you can answer this.
>> 
>> I am outputting a value 6 and a letter.  If the value is either an A or P,
>> when excel reads in the value, it converts to a time.
>> 
>> Any idea how to avoid this?
>
>If memory serves, preceed your value with a single doublequote to have it
>taken as a string literal.
>
>I'm assuming you mean it's being converted in Excel.  If not, ignore the
>above.

I have found that the OpenOffice.org and Excel import of CSV files can get
confused on field types when exporting from my accounting software for
import.  The only thing I found to be reliable was to export from my
accounting software into a MySQL table, then I use OpenOffice.org's data
connector to import the data from MySQL using the JDBC connector.

The import to SQL always works as each column's type is well defined so
there is no possibility of confusion.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

My reading of history convinces me that most bad government results
from too much government. --Thomas Jefferson.


More information about the Filepro-list mailing list