How to feed data back into same excel

I am working on a demo project where I have to send the reports of the stock market to different clients. The company’s whose stock price they want are stored in different excel, for example, client1’s requirements are in excel 1 and client2’s requirements are in excel 2 and so on. I am collecting stock market data from Moneycontrol.com.

  • I have to create a queue to push the stock report data.
  • Read all excel one by one, fill the data corresponding to company names in excel.
  • Send mail to all clients with their excels attached.

I have done some part of it but not getting the output.

Somebody, please guide me.

Hi @Shanky_Bhatnagar
Can you share the workflow

Thanks
Ashwin S

@AshwinS2 Thank you for replying

CustID_1117.xlsx (9.4 KB) CustID_1118.xlsx (9.2 KB) ReadCustExcel.xaml (9.3 KB)

I have these 2 excel files in a folder and I have to read them one by one and push the data to the queue… getting either of the following two errors.
1.Source: Bulk Add Queue Items
Message: The value for argument ‘Data Table’ is not set or is invalid.
Exception Type: UiPath.OrchestratorClient.Utilities.ArgumentValueNotSetException

  1. Source: Bulk Add Queue Items
    Message: Operation returned an invalid status code ‘BadRequest’
    Exception Type: Microsoft.Rest.HttpOperationException

Hi @Shanky_Bhatnagar

U havent pass the result variable as Datatable result

Thanks
Ashwin S

@AshwinS2 Sorry but Didn’t get you…can you please explain?

Hi @Shanky_Bhatnagar

Go to BulkAdd item Queue activity see the result property create a datatable variable

Thanks
Ashwin S

@AshwinS2 Still giving the bad request error. i added the data table variable in result aswell.

hi @Shanky_Bhatnagar

@Palaniyappan
Please help to solve the issue

Code is correct but dont know what is the issue

Thanks
Ashwin S

1 Like

@AshwinS2 i build the process again on a flowchart it worked.

I don’t know why that file is giving error.

Again my next problem is… i have to fill data in the client excel sheet through a website…
i have fetched data from website… but not getting how to write again everything in the excel for different clients.
can u plz throw some light.

1 Like

Hi @Shanky_Bhatnagar

Are you scrapping the data based on data scrapping or get attribute manipulations

if you are iterating means pass the datatable value again and check it again

Thanks
Ashwin S

1 Like

Sorry for the delayed response

For this, kindly check once with the datatable variable passed to this activity under the property “Datatable” . I hope it’s a datatable variable
And I hope it’s not about the Result property

And then

This usually occurs when we are trying to process large set of data. Is that so
Or are we using data from asset of such large size

Kindly provide these details buddy
We are almost done
Cheers @Shanky_Bhatnagar

@AshwinS2 i cannot use have data scraping since i have to enter different company names each time.

@Palaniyappan thank you for replying. it is a datatable variable and in result property as well I have given data table variable.

I am trying to push data from two excels.

however, when I build this process again in a different flowchart workflow, it didn’t give me the error.

Fine
If we are getting with same set of columns from the website scrapped data which is similar to that of our datatable and it’s column we can directly use merge datatable activity or append range activity
Or
If we want to get only certain columns from the scrapped datatable then
— we can use for each row loop and pass that scrapped datatable as input
— inside the loop use som assign activity and assign the required column values one by one like this
Out_value1 = row(“yourcolumnname”).Tostring
And
Out_value2 = row(“yourcolumnname”).Tostring
And
It goes on as required
— now still being inside the for each row loop next to these assign activities use a activity called add to datarow activity and mention our source datatable (the one we got from excel) name as one input parameter and then pass the above obtained variables as Array of value in ArrayRow property like this (in the order of column in our source datatable)
{Out_value1,Out_value2,…,Outvaluen}

Simple isn’t it
Hope this would help you
Cheers @Shanky_Bhatnagar

@Palaniyappan can u suggest, if i have number of excel files in a folder, i have pushed their data in the queue and corresponding to each company (data in queue) i have gathered data from website , how to rebuild the excel with all the data.

then i have to send mails to each customer also

1 Like

@Shanky_Bhatnagar

1 Like

@Palaniyappan dataReadfromBrowser(Autosaved).xaml (27.1 KB)

see i am doing this…there is no data table

1 Like

Fine
—I hope we are in loop
— like in this order

Excel application scope
-Read range
For each row loop
-Open browser
—Search for Data
—Extract Datatable (still we are in loop)
-For each row loop and pass the above extracted datatable as input
—now we can use assign activity to get the values
—use Add datarow activity

(once this is done for all rows in the current extracted datatable it will go to the next row to be searched in the outer for each row loop)
Like wise it goes on

Cheers @Shanky_Bhatnagar

If possible can you kindly share the screenshot of xaml
(Sorry that I m replying with my mobile)
Cheers @Shanky_Bhatnagar

I am using UI Automation Activities like type into, Get Text etc and i am storing data in different variables so there is no data table. how do we proceed den.

1 Like