# Excel interaction

**URL:** <https://discourse.openiap.io/t/excel-interaction/2315>\
**Category:** OpenRPA\
**Tags:** openrpa\
**Created:** [June 27, 2025, 8:59am UTC](https://discourse.openiap.io/t/excel-interaction/2315 "2025-06-27T08:59:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khanh\_Nam](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@Khanh\_Nam](https://discourse.openiap.io/u/Khanh_Nam)\
**Post date:** [June 27, 2025, 8:59am UTC](https://discourse.openiap.io/t/excel-interaction/2315/1 "2025-06-27T08:59:03Z")

</div>

I have a function to Read Excel like that

 ![image](https://discourse.openiap.io/uploads/default/original/2X/9/9acd0efde0c8e2b9d07e4993e60416b56e45721b.png)  
How can I get the name of this excel file ?

Thanks

---

<div class="post-metadata">

**Author:** ![Allan\_Zimmermann](https://discourse.openiap.io/user_avatar/discourse.openiap.io/allan_zimmermann/32/12_2.png) [@Allan\_Zimmermann](https://discourse.openiap.io/u/Allan_Zimmermann)\
**Post date:** [June 27, 2025, 12:56pm UTC](https://discourse.openiap.io/t/excel-interaction/2315/2 "2025-06-27T12:56:07Z")

</div>

`ReadExcel` only works if you give it the full path to a file that exists. I cannot see if you gave it a filename?  
So, if we assume you have given a full path to a file that exists, and you need to find the filename only, you can use [System.IO.Path.GetFileName](https://learn.microsoft.com/en-us/dotnet/api/system.io.path.getfilename?view=netframework-4.6.2).

You can call that as an expression in any input field or call it from the `Invoke code` activity.

---

<div class="post-metadata">

**Author:** ![Khanh\_Nam](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@Khanh\_Nam](https://discourse.openiap.io/u/Khanh_Nam)\
**Post date:** [June 29, 2025, 4:55pm UTC](https://discourse.openiap.io/t/excel-interaction/2315/3 "2025-06-29T16:55:35Z")

</div>

“%USERPROFILE%\Downloads\Temp\_DauVao\_FW\_1.xlsx”  
this is the link I put into ReadExcel. How can I get this path “Temp\_DauVao\_FW\_1.xlsx” . If I use invoke code, can you help me with this . Thank

---

<div class="post-metadata">

**Author:** ![Khanh\_Nam](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@Khanh\_Nam](https://discourse.openiap.io/u/Khanh_Nam)\
**Post date:** [June 29, 2025, 4:58pm UTC](https://discourse.openiap.io/t/excel-interaction/2315/4 "2025-06-29T16:58:38Z")

</div>

you can use [System.IO.Path.GetFileName](https://learn.microsoft.com/en-us/dotnet/api/system.io.path.getfilename?view=netframework-4.6.2).

how can I integrate this into openRPA app ?

---

<div class="post-metadata">

**Author:** ![Khanh\_Nam](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@Khanh\_Nam](https://discourse.openiap.io/u/Khanh_Nam)\
**Post date:** [June 29, 2025, 5:04pm UTC](https://discourse.openiap.io/t/excel-interaction/2315/5 "2025-06-29T17:04:08Z")

</div>

![image](https://discourse.openiap.io/uploads/default/original/2X/2/23f552648e5dad1487ea08e2fa0f873aa7138d5f.png)  
fileName = System.IO.Path.GetFileName(fullPath) #code in invoke code  
with this code, what is agrument I have to input in here

---

<div class="post-metadata">

**Author:** ![Khanh\_Nam](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@Khanh\_Nam](https://discourse.openiap.io/u/Khanh_Nam)\
**Post date:** [June 30, 2025, 4:33am UTC](https://discourse.openiap.io/t/excel-interaction/2315/6 "2025-06-30T04:33:55Z")

</div>

[Setup RPA error - OpenRPA - OpenIAP](https://discourse.openiap.io/t/setup-rpa-error/2316)

I already fixed this problem. But I still have this. Can you help me

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openiap.io/uploads/default/original/2X/a/a1ca7b164ac9a826839704d9ac82c7b5e6bcf557.png) [@system](https://discourse.openiap.io/u/system)\
**Post date:** [July 7, 2025, 4:34am UTC](https://discourse.openiap.io/t/excel-interaction/2315/7 "2025-07-07T04:34:34Z")

</div>

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