CSV opens in OpenOffice but adds slashes?

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


Solution 1:

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.

Solution 2:

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

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.