How to get sheetname to column a1 in csv

I am trying to get sheetname from a directory to single merged csv file.

Hi @rahulgola,
Please check out the Forum as there were similar topics before. From what I remember this can be done using vb.net code or using more dirty way by getting sheetnames by reading raw text from xlsx file.

1 Like

Thank you for the response Pablito, sure i will go through the other Forums. Thanks again

@rahulgola… do u want to get the currently active sheet name or all sheet names in a workbook.

I think this How to get sheet name might help you… have it a look!!

Hi @ManiPrajwal_K,

i hope you’re doing well.

I am trying to get the active sheetname as there is only one sheet in the working excels, and then add the same sheetname to the same excel column A or any.

@rahulgola… I appreciate your concern… Doing good, hope the same from you!

In that case to get sheet name, suggested link will help you.

The gist of the process you can try is mentioned below.

Usually, this process uses GetSheets method to get all the available worksheets in the workbook, but here u have only one sheet so you can you this process.

You have to use “Excel Application Scope” activity’s O/P variable. i.e of type UiPath.Excel.WorkbookApplication. (WorkbookApplicationVariable)

Now you have to use the expression:
WorkbookApplicationVariable.GetSheets - Use this in an assign activity.

Loop through the variable holding values from the above expression. you can get all the worksheets names.

Hope this solves your query for getting the worksheet name!