laracsv icon indicating copy to clipboard operation
laracsv copied to clipboard

Integer to string convertion

Open MajkelPl55453 opened this issue 5 years ago • 2 comments

Hi, If i put this string "123/456" which is a order number, the package will convert it to number like 123/456 not a string. How can I convert it to string?

MajkelPl55453 avatar May 18 '20 15:05 MajkelPl55453

Does it manipulate your value? Otherwise I think, it doesn't make any difference because it's all string when it's in a CSV file. Maybe you can also post your input and CSV output example here.

usmanhalalit avatar May 18 '20 15:05 usmanhalalit

Hi, but i think that when i put this csv into software like excel or open office then this software could convert this value to numbers and performe division operation.

Input in JSON format [{"col1":"xxxxx xxxxxx","col2":"2020\/000002","col3":"xxxxxxxxxxxx","col4":"xxxxxxxxxxxxxxxxxx","col5":"74.40","col6":"91.51"},{"col1":"xxxxxxxxxxxxxx","col2":"2020\/000003","col3":"xxxxxxxxxxxxxxxx","col4":"xxxxxxxxxxxxxxxxxx","col5":"213.00","col6":"261.99"}]

Output in CSV col1,col2,col3,col4,col5,col6 "xxxxxxxxxxxx",2020/000002,"xxxxxxxxxxxx","xxxxxxxxxxxx",74.40,91.51 "xxxxxxxxxxxx",2020/000003,"xxxxxxxxxxxx","xxxxxxxxxxxx",213.00,261.99

MajkelPl55453 avatar May 19 '20 06:05 MajkelPl55453