JREPL Usage - working but is this correct?
Posted: 08 Apr 2018 11:24
Hi Folks -
I do some excel to csv conversion and ETL work so sometimes there are extra commas. (Yes, I could add a piece to the VB code to do this).
To remove these commas, I'm using the following syntax:
And here is my file:
I assume there may be a more efficient way?
Thanks!
I do some excel to csv conversion and ETL work so sometimes there are extra commas. (Yes, I could add a piece to the VB code to do this).
To remove these commas, I'm using the following syntax:
Code: Select all
CD /D "%~dp0"
call jrepl ",," "" /F "Test.csv" /O -
call jrepl ",$" "" /F "Test.csv" /O -
And here is my file:
Code: Select all
ACT,10000000363014,1,2017,11,6,,,,,,,,,,,,,,,,,,,,
ACT,10000000363014,8,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000363053,1,2017,11,2.6,,,,,,,,,,,,,,,,,,,,
ACT,10000000363053,8,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000363065,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000363065,8,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000363013,1,2017,11,2,,,,,,,,,,,,,,,,,,,,
ACT,10000000363013,8,2017,11,0.6,,,,,,,,,,,,,,,,,,,,
ACT,10000000363027,1,2017,11,4.8,,,,,,,,,,,,,,,,,,,,
ACT,10000000363027,8,2017,11,2,,,,,,,,,,,,,,,,,,,,
ACT,10000000363017,1,2017,11,3,,,,,,,,,,,,,,,,,,,,
ACT,10000000363017,8,2017,11,3,,,,,,,,,,,,,,,,,,,,
ACT,10000000363011,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000363043,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000363064,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000363035,1,2017,11,3.6,,,,,,,,,,,,,,,,,,,,
ACT,10000000363021,1,2017,11,2,,,,,,,,,,,,,,,,,,,,
ACT,10000000703500,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000113170,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000373821,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000853170,1,2017,11,2,,,,,,,,,,,,,,,,,,,,
ACT,10000000833102,1,2017,11,1.75,,,,,,,,,,,,,,,,,,,,
ACT,10000000833109,3,2017,11,0,,,,,,,,,,,,,,,,,,,,
ACT,10000000303701,1,2017,11,3,,,,,,,,,,,,,,,,,,,,
ACT,10000000302890,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000852968,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
ACT,10000000903250,1,2017,11,1,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
Thanks!