Excel workbook that opens within an RDP session

I’m working in UiPath and need to extract data from an Excel workbook that opens within an RDP session. The file is opened automatically through an application when I click the export option. Since the file cannot be saved locally and both the file name and sheet name are dynamic, how can I extract data from this already opened Excel file?

Hey @arivazhagan_mathivan,

Since the Excel file opens inside an RDP session and cannot be accessed directly, use UiPath UI Automation. First, use “Attach Window” or “Use Application/Browser” activity to target the open Excel. Then use “Get Text” or “Get Visible Text” with dynamic anchors to extract needed cells. You can loop over rows using Send Hotkey (Down) and read data row by row. Optionally, use “Table Extraction” if the structure is consistent.

Thanks

Is the file location dynamic? If not there is an activity for waiting for a file to be downloaded into a folder which you should be able to use to detect the exported file and then, based on the filename, you should be able to use an Excel scope to hook into the file using the file path.

1 Like

@arivazhagan_mathivan

When you say you cannot save is it like a security restriction or you cannot actually save?

Ideally in such cases if the temp location is know wait for downlod is a good option

If not then use screen clicks to save it to local shared folder and then read it

Cheers

Don’t use UI Automation if you can read that file please :smiley: Use Excel modern activities.
For dynamic file name - that’s not a problem - use Wait for Download activity - it returns downloaded file name / path.
For dynamic sheet name - again, not a problem, especially if there’s only one sheet. Use this as a Sheet: Excel.Sheets.SelectedSheet, works in Excel Scope.

1 Like

@Mir.Jasimuddin @Anil_G @mateuszmacheta @Jon_Smith
The file automatically opens upon clicking the export button. Each time, the file name is different, and it cannot be saved locally.

@arivazhagan_mathivan

even if you click file and click on save as you cannot save?

cheers

Although I can save the file, it does not remain in the location where I save it—it appears to be stored temporarily or elsewhere.

@arivazhagan_mathivan

in save as window you can type the location to save plus the filename

cheers

If I remember correctly you can go to File > Information in Excel and it will show path of that file.
I think Wait for Download would still be able to capture that location - even if file is being saved in some temporary folder.
But I think the problem is that location is on remote machine, right?
Then I would try to think of all possible ways of exposing that file to UiPath. Is this some technical or security restriciton that you need to access that machine via RDP?
Can you install UiPath robot there? Can you share the file via some cloud drive for example?
It would make me very sad to fall back to screen reading for tabular data :disguised_face:

You can’t use these activities in a RDP window.

It has to be saved somewhere to be opened. Since you can access the RDP server, that means the RDP server could also access a shared network folder where you could save the file then read it with normal activities.

Ah thats a good insight. If the application is running in a VM, and the Excel is also opened in the VM, then its much tougher to manage.