Hi Manish,
I tried the suggested code in a copy of the "Get Worksheet Names" action to get only visible worksheets, as follows.
Dim wb As Object = GetWorkbook(Handle, WorkbookName)
Dim sheets as Object = wb.Sheets
Worksheet_Names = New DataTable()
Worksheet_Names.Columns.Add("Name", GetType(String))
If sheets IsNot Nothing Then
For Each sheet as Object in sheets
If sheet.Visible = True
Worksheet_Names.Rows.Add(New Object() {sheet.Name})
End If
Next
End If
Unfortunately, this only returns the worksheet name "Sheet1", which is not present in the workbook I tested it on.
The workbook I opened through Process stages of "Create Instance" & "Open Workbook" contains the following sheet names.
- Version Control (Visible)
- TYPE2 <6ELB-02-00-MPS-002> (Visible)
- UFA<SAM> (Hidden)
- MT-LFN 5WES-65-17 (Hidden)
- type 3 MDU (Hidden)
- Table Input (Hidden)
There are no errors when I run the action, it just doesn't get the currently active workbook visible worksheet names, seems like it gets
a default workbook sheet name.
It is close it working if you could help a bit further, or if anyone else can contribute some suggestions ?
Thanks
Mark Whitford