Replace tabs with commas in a .csv file

0

I have a .csv file that represents a table with 12931 entries. For example:

ID  A   B   C
1   9   hola    despues de hola va una coma 383
2   8   esto es sin comas   383
3   2   hola    los tabs en este campo son una coma estoy en B  383

Well you can deduce that ID, A and C are numeric and B is string. The problem I have is that I want to find a way as automatic as possible to replace the tabs that appear in B by a comma in the notebook or in another editor. You have to keep in mind that since it is a bit variable, I was doing it by hand. But they are 12931 rows. The final table in the .csv would be

ID  A   B   C
1   9   hola,despues de hola va una coma    383
2   8   esto es sin comas   383
3   2   hola,los tabs en este campo son una coma,estoy en B     383

Is there any way to do it automatically? In excel I can not because there are special symbols that it does not support.

    
asked by lsalvatore 06.02.2017 в 18:33
source

1 answer

0

This can help you then I'll tell you how to do it in SQL and Java

SQL:

    select replace(Columna_B, char(9), ' , ')

Java:

    columnaB = columnaB.replace("\t"," ,");

Greetings.

    
answered by 07.02.2017 в 04:17