Read first sheet regardless of name

There are a lot of posts on this, but they’re all old enough that they aren’t in the context of the modern Excel activities.

How do I specify Range for Read Range by index, instead of name? Either I’m missing something that’s staring me right in the face, or this is a glaring oversight by UiPath in the new versions.

2 Likes

Hi @postwick ,

It is indeed missing in the modern version,Sheet index should be added to the read range activity.
But I found a workaround mentioned in our community forum, Hope it helps you.

Please check the thread below,

Cheers.

Thanks,
Gautham

Hi @postwick

From the standardization of Excel related process development,
It is recommended to use sheet name to match a sheet in Excel file rather than index.
I think you can combine to use Get Workbook Sheet (get name) and Read Range (get value).

You can’t always know what the sheet name will be. Yes we can get the sheetnames by jumping through hoops but we shouldn’t have to. Everything else allows reference by index or name, and reading an Excel file should also support reference by index instead of name.

1 Like

Are you looking for the confirmation that index access is not offered e.g. by Code/Activities
OR
are you looking for a workaround done with essential activites or options

1 Like

I thought maybe I was missing a way to do it. Sounds like I’m not missing it.

no, but maybe a topic, that can be played back as feedback to UiPath

OpenXML code (pay off - seperated file open/close)
OR
For each worksheet loop and lk dict / list creation

are workarounds, but would be nicer if we got the feature directly.

Hope this all helped and the topic can be closed

So, i am in here looking for the same thing. It would sure be usefull to be able to loop through sheetnames, or in many cases to just have an option to use the only (visible) sheet in the file.

grafik

Yes I know we can use For Each Sheet, or Get Sheet Names etc but these are extra steps that shouldn’t be necessary. I was hoping for an expression that would allow designating the sheet by index.

@postwick
we already agreed to this statement. Maybe you reread it.

It was just about:

which is possible with shared Acitivty and also already available. And for sure it can also be given back to UiPath

1 Like

This sucks! Any news?

Nope. Just have to use Get Sheets or one of the other methods.

1 Like

I am so used to my good old MyWorkbookVariable.GetSheets.First approach.

I liked it because it was quick and clean!

Now I need

  • Excel Process Scope
    • Use Excel File
      • Get Workbook Sheets
      • Read Range

I don’t like it, because it makes the simplest Excel operation (unnecessarily) complex.

@loginerror, are you still forwarding feedback to the right places? This would be the thread! :slight_smile:

Thanks and best regards

1 Like