How to check whether required sheet is exist in excel by modern Activities?

Hi Team,

I want to check whether required sheet name is exist in excel.
By only modern activities.

Also Required column name in excel. shortest way

Want efficient way less time consuming.

Thanks

@Sanket_Shinde1

  1. Use for each sheet and if condition inside it
  2. Use read range for the range where you have columns

Cheers

1 Like

Any other way, instead of for each

@Sanket_Shinde1, This is the best approach with modern activities.

4 Likes

Hello @Sanket_Shinde1 There is another approach too you can try using Invoke VBA
Pass this code into your NotePad and then save it in your directory and try this approach

Function SheetExists(sheetName As String) As Boolean
Dim ws As Worksheet
On Error Resume Next
Set ws = ThisWorkbook.Sheets(sheetName)
If ws Is Nothing Then
SheetExists = False
Else
SheetExists = True
End If
On Error GoTo 0
End Function

Cheers

1 Like

Hello @Sanket_Shinde1

Forum_task (2).zip (10.8 KB)

Try this Flow hope it will work for you.

Regards,
Rajesh Rane

1 Like

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