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:

@Anil_G

Hi,

Can you try Worksheet property as the following.

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

Regards,

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 !!

@Rawan.md

Pass this in the Destination of formet table activity

CurrentSheet.Range("A3:G6")

Or what ever rage you have

Regards
Sudharsan

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

@Rawan.md

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

CurrentSheet.Range(“A3:T”+(total+3).ToString)

Try and let us know if you have any issues

Cheers

1 Like

it shows an error that

Source: Format as Table

Message: A table can’t overlap another table.

@Rawan.md

Do you have other tables in the excel?

Cheers

Yes we have other tables (sheets).

@Rawan.md

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

Cheers

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 …

2 Likes

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