Append NEW SHEET to the SAME WORKBOOK

excel

#1

Hi everyone,

Here’s the scenario:

Currently, my automation writes two different excel files - basically two different tables - everytime it runs. However, I need both the files to be in the same workbook as two different sheets. The first one being “Sheet1” and the second one being “Sheet2”.

Is there anyway of achieving that?

I am aware of the “Append Range” activity, but the content from the second table would be pasted right below the first one - and that’s not what I want.

Thanks.


#2

Hi @FlpVsg

could you maybe provide your start point, what is writing 2 tables (files)?
my suggestion would be to write range and put “sheet2” in the selection

other than that. please provide further details. thank you

cheers


#3

simple, while writing the result in excel define the “Sheet1” and “Sheet2” where sheet name require


#4

I was considering the DateTime when writing the filename, but after your comment I removed it and now I am getting one workbook with two sheets ;D Thanks.

However, I am facing another problem at the moment because I am using VBA code to customize the sheets. When I had two different files, I had the output:

image
TABLE 1

image
TABLE 2

But now I get the same output for table 2, but table 2 is just like:

image

I know the issue now is to do with my vba code (find it attached).

Formata.vba.zip (1.3 KB)

Any suggestions on how to make it generic to work on the two sheets of the same workbook?
Or any other way I could customize the sheets through UiPath?

Thanks.