Trying to open a CSV in open office - but it alters the data. Here is the the CSV in its raw format (opened in Notepad);

10-1001,product name 1,
10-1001-020,product name 2,
10-1001-030,product name 3,

When I open this in OpenOffice the first coloumns are changed to look like this...

01/10/01   product name 1
10-1001-020   product name 2
10-1001-030   product name 3

(Notice the first col - appears it is recognising this as a date, and trying to be helpful!)

Can anyone help with this!?

Thanks

Rob

link|improve this question
feedback

migrated from stackoverflow.com Feb 12 '10 at 2:39

This question came from our site for professional and enthusiast programmers.

2 Answers

because OpenOffice tries to recognize the field and it looks like a date field for it.

so you can try to import the CSV file (maybe you have to rename it to TXT in Excel it works this way) and set the field type to general or text to stop the auto-recognition.

link|improve this answer
feedback

As KARASZI answered, by default OOo will try to guess the type of each value in the CSV file, and import it accordingly.

You just need to set the column type explicitly.

Open the file in OOo, choose "Text CSV" as format to open as. You'll get an import dialog, at the bottom you see the columns that OOo recognized. If you click on a column, you can set its type in the dropdown above. Choose "text" to import the column text verbatim.

This feature is also useful if e.g. a file uses a different decimal or date format than is the standard in your locale.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown