Hello, I am attempting to obtain the name of a sheet without using the Excel Application Scope. Could you suggest an alternative approach for achieving this?
Sure. You can use “Get Sheets Name” activity from BalaReva.Excel.Activities package
Hi, It says its not compatible with Windows projects
Possible. Like many other custom activities in the Marketplace. I am still on Legacy also
You could contact the publisher if he plans to release Windows compatible package.
Okay. Thank you so much
you can try the Vb.net code for accessing.
Dim excelFilePath As String = in_ExcelFilePath
’ Create an Excel Application object
Dim excelApp As New Application()
’ Open the Excel file
Dim excelWorkbook As Workbook = excelApp.Workbooks.Open(excelFilePath)
’ Get a list of sheet names
Dim sheetNames As List(Of String) = New List(Of String)
For Each sheet As Worksheet In excelWorkbook.Worksheets
’ Close the Excel file
’ Release the Excel objects from memory
excelWorkbook = Nothing
excelApp = Nothing
’ Convert the sheet names to a DataTable and output it
Dim dtSheetNames As New System.Data.DataTable()
dtSheetNames.Columns.Add(“Sheet Name”, GetType(String))
For Each sheetName As String In sheetNames
out_SheetNames = dtSheetNames
workflow is attached
Sheetnameextraction.zip (143.0 KB)
The sheet name output will be in the format of data table.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.