String to datatype conversion

Greeting of the day…!!!
I am unable to write the scraped data in excel. I am getting the following error. Can anyone help me to rectify it?


1 Like

I hope you are scraping the data from web and you will get the value as text not as Data table. If you are trying to add the scraped data to a data table, then use the output variable which is of type Data table.

If you want to write the value to a string, instead of write range, use Write cell activity @soumi_soumiya


no worries
we can directly mention the datatable variable to write range or
if we have string as input then we can use GENERATE DATATABLE ACTIVITY where pass the string input and get the output with datatable variable that can use in write range
but i hope here we have the input already available as datatable which can be directly passed as input write range and it can take only dtatable variable as input and not a string
kindly try this and let know for any queries of clarification
Cheers @soumi_soumiya

1 Like

I can’t understand I will attach my work flow can you say me how to clear the (23.5 KB)

Thanks for your reply…
You are wright i am scrapping from web. Which type should i use

Use Excel application scope and then the write cell activity within it . So if you want write the scraped data to the cell, just simply providing the string variable to the write cell will work @soumi_soumiya

Thanks for your reply…
As you said i had given write cell activity in an excel scope but i am getting output as follows .

You have to change the range in every write cell activity @soumi_soumiya :slight_smile:
so that they will write the values in new cell everytime

Thanks for your reply…
I had done but i am getting same output Capture1
So can you give me any example how to do else can i attach my workflow…

Please attach the workflow @soumi_soumiya

Thank you,
I am attaching my workflow (23.6 KB)
and also i am having the other issue that only first mail is getting read

Here it is. It will write the values in the next rows. Make sure you have 15 unread messages now and then run process :slight_smile:

Risk_Management (2).zip (14.2 KB)

1 Like

Thank for your reply…
Sorry I am getting same output which got previous there is no change only the first mail is getting read and only data “Ok” is getting written in excel.

Are you getting any error after that or it simply closing the process?

I thing the remaining mails don’t have that text which you are filtering or check the length of the messages before looping with for each @soumi_soumiya

Thanks for your reply…
It does not show any error it just closes the application and i had given the length as 2 since i have only two mails related to this.

Are you sure your second mail also contains the text you are searching?

Thanks for your reply…
This is my first mail

This is my second mail

If you see here @soumi_soumiya, You are checking for Risk Management text :slight_smile:,

Are you sure your subject contains that and both are unread messages ?

Thanks for your reply…
Yes,both have same subject and also unread

That was strange @soumi_soumiya.

Can you try making the selectors dynamic :slight_smile: