Hi all
I have used Data Scraping to extract data on the web and then write into the excel file.
But I have error as below picture… if I change from row(1).ToString to row(2).ToString or row(3).ToString …. then the process is fine.
What is an error and why it happen ?
Thanks you!
sarathi125
(Parthasarathi)
March 19, 2019, 8:54am
2
Hi,
Check row(1) has any value, may be null.
Always try to use Convert.Tostring(row(1)) this will avoid issues.
1 Like
To write directly into the excel after Data Scraping you can use write range with datatable variable which you got after extraction no need to loop it.
1 Like
Srini84
(Srinivas Kadamati)
March 19, 2019, 8:56am
4
@trunghai
What exactly you are trying to achieve?
1 Like
As per your screenshot you are entering row(1).ToString in the SheetNumber field. Recheck with the values in row(1)
1 Like
Hi @sarathi125
Row(1) as below picture… I don’t know what different is in this.
The value in row(1) - you are using as sheet name.
Make sure the sheet exists in your excel file.
Regards,
Karthik Byggari
1 Like
Try removing the range. Leave it as “” .
1 Like
Hi @KarthikByggari
I have used the CSV file as below to search product model on the web, and then write data into the new excel file… the Sheet is created automatically with the name same with model which I search.
Got it.
The problem is in the sheet names you can not use special symbols “/”.
Try replacing “/” with any other letter or with empty.
row(1).ToString.Replace("/","")
Remove special character and it works.
Hi @KarthikByggari
I must be use the Assign activity to remove “/” right ?
row(1) = row(1).ToString.Replace(“/”,“”) ??
lakshman
(Ganta lakshman)
March 19, 2019, 9:18am
12
@trunghai ,
If you want use assign else you can directly pass in Write Range also no problem.
row(1).Tostring.Replace(“/”,“”)
Hi @lakshman
Thanks you for your suggest, but it show a new error as below picture.
sarathi125
(Parthasarathi)
March 19, 2019, 9:27am
14
Hi,
Print that row(1).Tostring using a writeline activity, I think no value in it.
Thats why I have mentioned to use Convert.Tostring() instead of .Tostring.
Hi @sarathi125
Sorry but i’m not understand clearly your mean.
Could you pls check in my XAML file ?QA - Get data from DMX.xaml (45.1 KB)
sarathi125
(Parthasarathi)
March 19, 2019, 10:18am
16
Hi,
I have checked and updated. I have added a message boxQA - Get data from DMX.xaml (45.1 KB)
in that just for your understanding. remove it once done with the changes.
Hi @sarathi125
Thank you, I have tried to run your XAML file but the result same before as below.
Hi @KarthikByggari
I have tried to replace with product name without “/” character. But the error still appear when run process.
It very strange!
Thanks you all of you… I have delete old process and create a new one… The result was fine ^^.
1 Like
system
(system)
Closed
March 23, 2019, 2:27am
20
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.