Specified Sheets using Modern Excel Acitivies

Hi there,

I’m facing a problem with specific number of sheets in For each Sheet Activity!

I need to format these sheets in the excel file but not all of them , only 4 of 8 sheets

I tried to use For Each Activity with a sheet list ( string var) that hold the only 4 sheets i want ) but with Format As a Table its not working because its needed a IReadWriteRangeRef variable !!

How to specified sheets in the iteration of the For each Sheet Activity!!

Any Suggestions it will be thankful :pray:



Can you try Worksheet property as the following.

sheets.Any(Function(s) s=CurrentSheet.Worksheet)


1 Like

Thanks a lot @Yoichi :star_struck:

it’s working well , but still have another issue , My table headers are starting from A3 … I tried to use CurrentSheet.Range(“A3”) , but didn’t work > Can’t overlap another table !!


Pass this in the Destination of formet table activity


Or what ever rage you have


1 Like

I can’t ! Its NOT a fixed rows size !!

This is not working for me > CurrentSheet.Range(“A3:T”+total.ToString)

which total = DT.Rows.Count


I beleive you need to add 3 to the total as the rows start from A3 so the formul would be


Try and let us know if you have any issues


1 Like

it shows an error that

Source: Format as Table

Message: A table can’t overlap another table.


Do you have other tables in the excel?


Yes we have other tables (sheets).


Is the other table in thw same range as this table?

Then it might bw an issue

Can you check in rowcount if its taking some blank rows or rows from othwr table as wel


Thanks a lot for your helping
@Anil_G @Sudharsan_Ka @Yoichi

I really appreciate that :pray:

For @Yoichi’s solution, I will mark it as a solution because it was my the main problem for this topic …


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