Hi
Can any help to deserialize CSV to Data table. And in CSV Sheet cell B2. the data is available in JSON format.
Screenshot -
I used deserialize JSON & Deserialize JSON array activities to perform but getting errors. and unable to write it in Data Table.
Attaching an screenshot for output reference.
vrdabberu
(Varunraj Dabberu)
February 6, 2024, 9:05am
2
Hi @Naman_Arora
Please provide the Json Data
Regards
Hi @Naman_Arora
Provide the sample input file
@vrdabberu
Here is the JSON data, which is available in cell B2 in CSV sheet.
csvjson.json (543 Bytes)
Regards
Naman
ppr
(Peter Preuss)
February 6, 2024, 9:42am
6
For conversion of the JSON into a DataTable we can do:
lrtetala
(Lakshman Reddy)
February 6, 2024, 9:42am
7
Hi @Naman_Arora
Can you try the below
Sequence5.xaml (11.7 KB)
sample input 2.xlsx (8.9 KB)
Cheers!!
vrdabberu
(Varunraj Dabberu)
February 6, 2024, 9:44am
8
Hi @Naman_Arora
Please check the below workflow:
Main.xaml (19.4 KB)
sample input 2.xlsx (9.0 KB)
Regards
@vrdabberu
Hi
I want to deserialize the cell B2 in CSV. I used Read CSV activity then I created a variable using assign activity which will read cell B2 value. However I still getting errors when I using deserialize JSON activity after that.
Regards
Naman
@vrdabberu
I understood the concept behind deserialize but my concern is to read a CSV and particular cell value which is available in json format and deserialize it into a new data table.
vrdabberu
(Varunraj Dabberu)
February 6, 2024, 10:34am
11
Hi @Naman_Arora
Please use the below workflow:
Main.xaml (19.7 KB)
REGARDS
ppr
(Peter Preuss)
February 6, 2024, 10:37am
12
as we had shown a working JSON to DataTable conversion it would be necessairy to tell us directly
what was done
which error occured
@vrdabberu
When I tried to run the workflow you shared. I made some changes according to the data I have. So data is in cell K2 in CSV.
I have change the expression to read K2 - dt1.Rows(1)(10).ToString
But I’m getting this error.
vrdabberu
(Varunraj Dabberu)
February 6, 2024, 11:11am
14
Hi @Naman_Arora
In the read csv activity if you have given the has headers as true then please give the below syntax:
dt1.Rows(0)(10).ToString
If you didn’t gave the has headers as true then please use the below syntax:
dt1.Rows(1)(10).ToString
Regards
Anil_G
(Anil Gorthi)
February 6, 2024, 11:20am
15
@Naman_Arora
index of row start from 0 and not 1 …also column index also starts from 0 and not 1
so dt1.Row(0)(10).ToString
As Per error it says there is no second row
cheers
@vrdabberu
Thank you so much. it worked finally.
vrdabberu
(Varunraj Dabberu)
February 6, 2024, 11:26am
17
Hi @Naman_Arora
If you find the solution please do mark as solution to close the loop.
Regards
system
(system)
Closed
February 9, 2024, 11:27am
18
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.