How to write to a new Xcel column for each extracted data table

Hi guys, I’m data scraping a table of sales for each company in a list and writing that table to an xcel sheet. For every table i extract i want to write that data to a new column. I pretty much have everything working I just need to know how to write to new columns. I also don’t need the bot to know which column to put the data in as i just need it to write it right to left. I included a ss of what i want it to be before and after.
before
after

Hi @luke.kowalski.trading

You can try with Add data column

  • after adding you can write the values in excel on each run

Regards
Sudharsan

@luke.kowalski.trading

  1. While “Data Scraping”, you have already mentioned column name and got the “ExtractDataTable”.
  2. While Writing to Excel sheet, you should set the “Starting Cell” property.
    Means in which cell you would like write the “ExtractDataTable”.
    for example, If you want to write your DT to C1 then do it as below
    image

Hi, the problem with that is it then overwrites “C1” each time it extracts the table meaning I’m only left with the final table of the run everytime.

@luke.kowalski.trading
Could you please explain bit more?
Please share screen shots.


Here’s my process, you can see my before/after screenshots of what I want it to do in my original post.
excel grab
This is what the output of the process is, it just overwrites the preceding table until just the last one is left. So what I want is for the table to be added to a new column every time. Im sure the solution has something to do with the ‘add new column’ activity but i dont know how to work it.

@Karuna need to remember to mention this so you know I replied. :grinning_face_with_smiling_eyes:

@luke.kowalski.trading

  1. Your “Write Range” activity is inside the for loop so you should always keep the “Write Range” activity outside the “For Each Row” loop.
  2. Why are you reading Exce file at the beginning? Instead you can directly write to excel.

@KarunaD

  1. I have a ‘Type Into’ activity that reads company names off a sheet and searches for them, i forgot to include it in the ss but that’s why the read range is there.
  2. 'Write Range is in the loop because it needs to reference the output of the ‘extract data table’, otherwise it wouldn’t be able to see the output variable if it was outside the loop.
    Maybe there is a better way to do no.2 but I don’t know it.

@luke.kowalski.trading
Could you please share the full screen shot of your workflow?

@KarunaD EarningsscraperTemplate.zip (3.2 KB)
It’s changed a bit as I’ve been struggling through solutions so here’s the entire thing.
I know you won’t be able to run it because you don’t have access to the website but it’s just a normal extract data table so just substitute some random table off another website.
It’s so nearly working but my final problem is what the screenshot shows


So my problem is why is it showing the words data table instead of the actual extract? it’s putting the table in the right place and successfully navigating through the list of companies but it won’t write out the numbers.

Hello @luke.kowalski.trading

What have you used to write the datatable values into Excel?

Also If you want to see the Extracted DataTable Data into String_Type then you can use “Output DataTable” Activity.

And If you are able to view the data successfully then using “Write Cell” Activity You can pass that StringVar and Write it into Excel.

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

@Pratik_Wavhal Hi, could you look at my worksheet that I’ve included and try and see what wrong?
I’m using an ‘add data row’ to input the dt and ‘write range’.
I couldn’t get ‘output data table’ to work, it just returns blank.EarningsscraperTemplate.zip (3.2 KB)

@luke.kowalski.trading
I have changed your xaml file. Please run and let me know.

EarningsscraperTemplate.zip (3.8 KB)