Could you please tell me whether it’s possible to get the sheet’s names of an Excel file without using Excel Application Scope and without opening the Excel program?
If you want to get it inside UiPath then Excel Application Scope is mandatory, if you dont want to use it then write your custom code and use it else try with Invoke Code activity with some vb.net code which will get excel sheet names alone.
Okay thank you. I thought it could be possible to do it via UiPath somehow
Yes you can get excel sheet name by using vbscript
@indra, @sarathi125, thank you for your replies. Could you please help me with one more thing? I use Read Range activity from the Workbook section and store it in dt variable. So dt contains the table. There are 5 columns in this table. I want to write 2 columns from there to another Excel file. How do I do it?
For instance, dt has 5 columns: Col1, Col2, Col3, Col4, Col5. And I want to write Col2, Col3 to a new Excel file.
using excel uipath or vbscript
@indra, yes, but I can’t get how exactly I can do it. I’m using the Write Range activity. All I can think out now is just reading columns I want, store them in a separate variable and write the whole variable which is not comfortable in some cases. I would like to read the whole workbook, store it in a datatable variable and then address the exact columns I want via just one variable.
@indra, wow thank you a lot, it worked. Why are you using the ‘DefaultView’ method though?
refer this link
@indra, thank you very much, it’s solved Now I need to understand how to save the formatting but this is another story, thanks
How is this possible can u plz share xaml file.
I checked ur xaml file that is for copying data from one sheet to other sheet.
but i need to get names of excel sheet in a notepad or write line
Please help me in this .
@Bharti_sanghmitra There is custom activity called Uipath Excel Extended Activities install this than you can get sheet name
@Bharti_sanghmitra Download attached xaml file and in Excel Scope Just pass file path it will give sheet name
Excel_Sheets.xaml (7.6 KB)