Want to get the name of current active worksheet in excel

Hello Everyone

I want to get the name of only the current active worksheet present in an excel workbook.

Is there any way to do that without using macro.

Like, in the screenshot below, the Sheet1 is active.

image

screenshot below, the Sheet2 is active.

image

So, for number one, I need this active sheet names.

@Palaniyappan
@ImPratham45

Do you have any insight in this case? if yes, please help.

Thanks & Cheers

1 Like

Hi @AryanSingh
1.use read range and pass the sheet name
2.Use excel application scope and pass the path of the excel and create a workbook variable in excel application scope workbook property.
3.use for each item in wb.GetSheets
4.print the item in message box

Thanks
Ashwin S

Thanks
Ashwin S

Hi
Kindly have a view in this thread

Cheers @AryanSingh

Get the sheet Name by wb.CurrentWorksheet.Name

2 Likes

@kuppu_samy

Hello

I have tried with your way, but its giving me an error.

Thanks

@Palaniyappan

I can’t use the macro, that is why I am saying without macro.
How can we get current worksheet without using macro?

Thanks
Aryan

1 Like

@kuppu_samy

Check the issue above.

Thanks & Regards
Aryan

Awesome
Let me tell you how to do that
—use Start process activity and pass the file path of excel as input
—now this will open the file in foreground
—then use SEND HOT Key Activity and mention the key as alt+h without any selector chosen
—now use another send hot key activity with key o
(Not zero its o)
—and another send hot key activity with key as r
—then a final send hot key with key as ctrl+c

—now use a GET FROM CLIPBOARD activity and get the output from clipboard with a string variable named str_input

Cheers @AryanSingh

4 Likes

@Palaniyappan

Ok, its a long process but I think it will work

Let me try.

Thanks.

1 Like

Yah it would @AryanSingh

1 Like

Is it working @AryanSingh

1 Like

@Palaniyappan

Its working. Now I remember, that the shortcut keys are from the past solution of copying sheets and renaming them.

@kuppu_samy
@Palaniyappan
@AshwinS2

Thanks & Cheers
Aryan

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.