How can I remove the comma and space from text at the beginning of each line?

Name,lat,long are variables

text

,Name,Latitude,Longitude
, P1, 30.79036, 31.40862
, P2, 30.79042, 31.40904
, P3, 30.79009, 31.40933
, P4, 30.78972, 31.4094
, P5, 30.78934, 31.40919
, P6, 30.78925, 31.40864
, etc ...

How can I remove the comma and space at the beginning of each line and spaces after comma?

to be

Name,Latitude,Longitude
P1,30.79036,31.40862
P2,30.79042,31.40904
P3,30.79009,31.40933
P4,30.78972,31.4094
P5,30.78934,31.40919
P6,30.78925,31.40864

Many would tell you to fix the problem at source, asking why is the data like that in the first place.

But you can can use the available text blocks to remove the first two characters from your strings.

the original text was in this form
generated by bingmap extension point locations

{"P1":[30.78973794675052,31.40757901544131],"P2":[30.789870755708826,31.408119229100716],"P3":[30.790329985164597,31.408252082265985],"P4":[30.790426791063133,31.407745396219266]}

I want to export it as csv file

P1,30.79036,31.40862
P2,30.79042,31.40904
P3,30.79009,31.40933
P4,30.78972,31.4094

I use text blocks to remove all unnecessary symboles

I am try also to use WebJson text decode
but the same Problem

Use dictionary blocks to form your output

image

1 Like

Why the first row in the generated csv file is empty
How can I remove the first empty row
Screenshot 2024-06-30 132248

A little bit more trickery required:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.