Read and write into excel

Hello,

before we start, sorry for the long post…
I am StudioStarter and have the following Excel challenge:

  • I have folders full of those spreadsheets, cant change the format, I need to leave the format as it is.
  • Two rows always belong together (except 1&2 obviously), e.g. row 3&4, 5&6, 7&8 …
  • Spreadsheets have different lengths (some can have 100 positions). In this case, I have total 5 positions

What I need to do:

  1. First, while I dont know, how many positions are in each list (some spreadsheets are empty), I need to check if there is a first position → I need to check if “B3” = something

  2. If B3= something, I need to store all Information for this position in different variables. In the first case I need “D3”, “D4”, “H3” and “I4”

  3. In the next steps, I use those variables in another application, to get addiotional information, this step is not relevant for my question

  4. I then come back to this spreadsheet and have 4 more different variables from Step 3 (from my other application). I need to store then the new Variable1 in “E4”, Variable2 in “F4”, Variable3 in “G4” and Variable4 in “H4”. Then this position is finished.

  5. Next I will continue and check if there is a next position, in this case “B5” = something

  6. I will do the same procedure following the same scheme from step 1-4 …

  7. After a while, there is no more position in “B13”, I save the spreadsheet and open next file in the folder doing the same all over again

I hope this was understandable, I tried different attempts now and achieved at least to read the different postions correctly by checking in each row for my CurrentRow.item(). But I dont have a solution then to write in the spreadsheetl in Step4.

Let me know if you have a solution
Thank you so much
Best
Rene

1 Like

Hi and welcome to the Uipath forum
Can you share the Excel input file?

test2.xlsx (10.8 KB)

Hi Emira,
sure, no problem.
Thanks

1 Like

Hello @rene.stein
Kindly find the Xaml attached here :point_down:, you may get some idea

Forum_Excel_2Rowprocess.zip (89.2 KB)
Note: Process is based on Datatable

Hi
I think this is the best and easiest way to achieve that. All you need to do now is Loop through your folders and files.
Let me know if that helps.
Excel Automation.zip (44.4 KB)

1 Like

Hi,

thanks, that works fine and easy.

Meanwhile I developed and found my own solution.

You are using “While” Activity and then using “multiple assign” acitivities.

My solution on the other hand works with “for each row” and then “Get row Items” activities.

I think your solution is more efficient.

Thank you very much, aprpreaciate it!

1 Like

Hi,

thanks for you help.

Unfortunately I can´t open you project, I think I got some Issue with versions of UiPath, not sure.

But I found solution anyway, so thank you for your help!

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