Adding Data to Excel Sheet in StudioX

Hi all,

Still fairly new to StudioX so please be nice :slight_smile:

I built an automation, opening an Excel file, picking a number, entering it in another system, get a couple of fields from there and compare the fields with entries in the original Excel file. Works so far.

In case the values do not match, I want to create another Excel file with some error protocol, containing the number, and the two not matching values.

However, I did not manage to get this done, meaning to open the output Excel file, and then write information to fields. My challenge is that with Write Cell I can only provide exact fields such as Sheet1!A2 which is fine for the first row, but what I need is to detect the first empty row and then to add the data there. Maybe clean the file before adding the first row, so it will not endlessly grow.

Any ideas? Really stuck here. :frowning:


Use Excel File.
Append Range.
Auto Fill.
Autofit Range.
Change Pivot Data Source.
Clear Sheet/Range/Table.
Copy/Paste Range.
Create Pivot Table.


Sorry, but do you think this makes any sense? Why should I use a pivot table for that?

If I understand correctly, given a number of input fields placed in different rows in Excel1, you are trying compare the output fields in Excel2 for each input field.

If you place the Write Cell activity inside the “For Each Row in the Excel file” activity, it will allow you to select the value in the CurrentRow of the column you select. There is a course with detailed step by step information on how to achieve this which I link you to here (Iterations).
Let me know if that helps!