How to slow this to get the excel sheet names with out opening the excel
Please help me on this ggggh
How to slow this to get the excel sheet names with out opening the excel
Please help me on this ggggh
Use the below code in Invoke Code:
Dim app As Microsoft.Office.Interop.Excel.Application
Dim wb As Microsoft.Office.Interop.Excel.Workbook
app=New Microsoft.Office.Interop.Excel.ApplicationClass
app.Visible=False
app.AskToUpdateLinks=False
wb=app.Workbooks.Open(ExcelFilePath,False,False)
shArray=wb.Worksheets.Cast(Of Microsoft.Office.Interop.Excel.Worksheet).Select(Function(x) x.Name).ToArray
wb.close
Invoked Code Arguments:
Create a variable arr_SheetNames
in your workflow of DataType Array(System.String) and map with the arguments which will store all your Sheet Names after reading the excel.
Regards
Hi,
The following post may help you. This works even if Excel is not installed.
Regards,
Use Classic activity Get Sheets
If it’s not visible in your activities panel, click on the filter icon on activity panel and check Classic.
Thanks,
Ashok
What are the index I need to write
If you want to do an operation in each sheet, just use For Each Excel Sheet
Here I used read range workbook activity to get ready the excel file then I used the get workbook sheets then what should I write in output sheets? Here I don’t know how many worksheets are there?
Write this code in Invoke Code and run a For Each loop for arr_SheetNames
and in Read Range Workbook pass currentText in the place of SheetName.
Regards
Use like this:
This will return you array of string which will hold all sheet names in the file.
For understanding I have printed it in log message. You can utilize it as you wish.
Input file:
Output:
Get Sheets.xaml (10.8 KB)
Thanks,
Ashok
After this what should I do error is cleared now next?
run a For Each loop for arr_SheetNames
and in Read Range Workbook pass currentText in the place of SheetName and read the sheet. What is the process you want to do after retrieving Sheet Names.
Regards
Exception has been thrown by the target of an invocation error message is coming
Can you share the excel which you are using I will help you with the workflow.
Regards
After this I want to create a newfolder for each of the worksheet with the same name
Check the flow @Naveen_Kanike
Input Sheets:
Check the below flow:
Sequence38.xaml (9.7 KB)
Output Folders:
Regards
New Microsoft Excel Worksheet.xlsx (10.6 KB)
This is the dummy data same format of the actual work i need to do
Check the below zip file:
ExcelSheetNames.zip (48.5 KB)
Let me know if it meets your requirement
Regards