hoger qassim hoger qassim - 1 year ago 100
SQL Question

How to avoid automatically change data type in .CSV file

I have created an application in java language and I have used MySQL as a DBMS. I have a button in this application which export my data to .CSV file.

The problem is that when I open .CSV file, it automatically change the data. For example,

will becomes

How can I avoid automatically change data type in excel?

Answer Source

If you open the *.csv directly in Excel, then all columns will be read as type general (means there is an automated guessing for the value type).

If you import the file as text into the current sheet you can specify the value delimiter and also the type of each column.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download