How to write data in excel cell

Hello guys ,

Can some one advice to get the data perfectly in excel , i am not getting all 5 columns in excel and all lines…

My code is only writing 2 columns and 1 line while it runs the code for 10 line items from sample file and writing only 1 raw and 2 columns.

I have attached the flow although it is a rough but , it is taking a data from file search online and then write back to excel by performing scraping,

Last 5th column is like data table how can i get this data in a single cell as string,

although by message box activity i am able to see this is being scraped well only not being written in excel.

scrap is output file and test data file from where i take the details.

below is link where is search and get the details.

BTI Consultation

Please help…scrap.xlsx (46.2 KB)
Test data.xlsx (820.8 KB)

image
image


searchonline.xaml (68.6 KB)

Hello Vinay,

I tried to use a structured data scrap and it fetched me all the details as per the available structure in your URL. Please find the attached screen shot.scrapdttbl

Hello ,

I.also tried this the question is how to do this structure data scrap in middle of the process we need to scrap data for 10000 similar pages .

Data should come Horizontally in excel raw.

On the same.page if you take next ink selector , it will run only 1 time.

@Vinay_Swarnkar

You can try using Get Visible Text activity to fetch the text, split it using string manipulation, and assign it to your DT using a For Each Row activity.

@Vinay_Swarnkar

Can you try Get Text activity and write the result to Datatable as below

DatatableVariable.Rows(RowNumber).Item(ColumnName) = GetTextVariable

Hope this may help you

Thanks

Hello ,
Can you suggest in more detailed way , in which step you suggests this activity.

Thanks

@Vinay_Swarnkar

Check below for your reference

Reference

Hope this may help you

Thanks

Build Datatable overwrites the dt each time. Don’t Build Datatable inside your loop. Build it once at the beginning.

1 Like

Hey Paul,

Thanks for notice , it worked , i am just one step away if you can help a little more.

I request if you can advice on last column which is a data table and need to convert to string and then write in excel cell ,

I am able to scrap 3 column but not 3rd and 5th,

Please can you give small time.

I attach the process.

I will be thank full to you.

searchonline.xaml (64.9 KB)

You could use the UiPath.WebAPI.Activities library to convert the datatable to JSON, then output the JSON into the Excel cell as a string.

1 Like

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