Service Virtualization

Expand all | Collapse all

How to read comma value form csv file

Jump to Best Answer
  • 1.  How to read comma value form csv file

    Posted 07-23-2018 03:38 AM

    Hi, 

     

    I am having big excel data sheet which contains formula and its taking too much time to load the test case due to formula, so I have converted the excel sheet into the CSV file using java code. 

    Problem statement - My excel having Amount column which is having amount as $50,0000 and when its getting converted to CSV the value is "50,0000". 

    As per the java code. 

     

    IS there any way to remove double quote while inserting the data in DB using JDBC step ?

    or can we remove the quote while converting to CSV .

     

    Regards, 

    Vinay Nagariya 



  • 2.  Re: How to read comma value form csv file
    Best Answer

    Posted 07-23-2018 06:07 PM

    Hi,

       String n="\"50,0000\"";
       String m = n.replaceAll("^\"|\"$", "");

    The above lines of code will work in JAVA.

     

    Vish