# Read and parse excel data

**URL:** <https://forum.robotframework.org/t/read-and-parse-excel-data/937>\
**Category:** Development\
**Created:** [6 November 2020 00:54 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937 "2020-11-06T00:54:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![natK](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@natK](https://forum.robotframework.org/u/natK)\
**Post date:** [6 November 2020 00:54 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/1 "2020-11-06T00:54:34Z")

</div>

HI, i am looking for right excel library and way how to design test test in PyCharm. Excel file included 6-7 columns and many rows. It has to be loop to execute each row. I think to keep read data from excel in one file and execution in different . I need to get row information and path it to different file, then re-start loop after execution. Is it possible to do? Do i need to keep excel file in the project directory?  
Does robotframework-datadriver allow only one Test Case per page?  
I have excel file in PyCharm directory but i can’t open it even after click on Open in Excel Reader (robotfamework-excellib is installed ).

Thank you

---

<div class="post-metadata">

**Author:** ![sandmehta2014](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@sandmehta2014](https://forum.robotframework.org/u/sandmehta2014)\
**Post date:** [8 November 2020 03:40 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/2 "2020-11-08T03:40:56Z")

</div>

Hi,

I would recommend you to install Robotframework-excellibrary-xwfintech

For more details check the post:

> **[How to read data from excel sheet in Robot Framework - Robotic Process...](https://www.aakarsoft.com/blog/how-to-read-data-from-excel-sheet-in-robot-framework/)**
>
> We all know reading and writing in an excel is a very frequent requirement of Robotic process automation. In this post, we will discuss how you can read data from an excel sheet using the Robot framework. We are using PyCharm as an IDE. To read data...

Regards

---

<div class="post-metadata">

**Author:** ![Noordsestern](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/noordsestern/32/4270_2.png) [@Noordsestern](https://forum.robotframework.org/u/Noordsestern)\
**Post date:** [14 November 2020 18:43 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/3 "2020-11-14T18:43:32Z")

</div>

Hi @natK,

I believe there is a confusion:

Either you want to read an excel file, then you are right to check for an excel library.

Or you want to generate test cases with data from an excel file, that’s why you use data driver. But then you would not need an excel library.

Which one is it?

---

<div class="post-metadata">

**Author:** ![natK](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@natK](https://forum.robotframework.org/u/natK)\
**Post date:** [16 November 2020 01:24 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/4 "2020-11-16T01:24:29Z")

</div>

Hi… on this step, i need to read data only … will take a look at  
Robotframework-excellibrary-xwfintech… thank you all for replay

---

<div class="post-metadata">

**Author:** ![Noordsestern](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/noordsestern/32/4270_2.png) [@Noordsestern](https://forum.robotframework.org/u/Noordsestern)\
**Post date:** [20 November 2020 06:11 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/5 "2020-11-20T06:11:38Z")

</div>

I can recommend `RPA.Excel.Files` from rpaframework. Its keywords are very convenient for reading (and writing) excel files:

> **[Excel.Files — RPA Framework documentation](https://rpaframework.org/libraries/excel_files/)**

---

<div class="post-metadata">

**Author:** ![natK](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@natK](https://forum.robotframework.org/u/natK)\
**Post date:** [27 November 2020 05:09 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/6 "2020-11-27T05:09:20Z")

</div>

Markus, thank you for idea.  
Does RPA.Excel allow create new excel file and enter new row after each execution ? In manual they give an example to enter bulk of records

---

<div class="post-metadata">

**Author:** ![kulkarnivp](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kulkarnivp](https://forum.robotframework.org/u/kulkarnivp)\
**Post date:** [21 December 2021 05:31 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/7 "2021-12-21T05:31:48Z")

</div>

Is there any restriction on version of Python using. Because I’m unable to import RPA.Excel.Files  
Library RPA.Excel.Files

Showing as Import File not found. Tried restarting PyCharm for 2 time but no solution.

Thanks,  
Vivek Kulkarni

---

<div class="post-metadata">

**Author:** ![Noordsestern](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/noordsestern/32/4270_2.png) [@Noordsestern](https://forum.robotframework.org/u/Noordsestern)\
**Post date:** [21 December 2021 18:51 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/8 "2021-12-21T18:51:43Z")

</div>

Hi @kulkarnivp  
That’s funny! If you had asked me earlier, I would not have known. But I ran in to a similar problem yesterday:

Apparently, `rpaframework` does not work with Python 3.10, yet. When installing rpaframework under 3.10 you either get funny exceptions or pip only installs version 0.1.0 .

Robocorp states, that it does work officially on Python 3.7, but I also used it successfully with 3.8 and 3.9 (I did not try RPA.Excel module, though).

I hope that helps,  
Markus

---

<div class="post-metadata">

**Author:** ![kulkarnivp](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kulkarnivp](https://forum.robotframework.org/u/kulkarnivp)\
**Post date:** [23 December 2021 08:12 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/9 "2021-12-23T08:12:25Z")

</div>

@Noordsestern ,

Thanks for the info. It was problem with 2 versions of Python running on my system. 2.7 and 3.9 removed 2.7 and installed rpaframework through pip command and got installed.

I’ll proceed with this from excel work flow.

Thanks,  
Vivek Kulkarni

---

<div class="post-metadata">

**Author:** ![kulkarnivp](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kulkarnivp](https://forum.robotframework.org/u/kulkarnivp)\
**Post date:** [23 December 2021 08:38 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/10 "2021-12-23T08:38:18Z")

</div>

@Noordsestern

Seeing one more problem able to read teh data from XLS file but when tried to write back its not working. Test Case is passing but No Dats is saving teh excel file.

Could you please help me with this issue if you come accross.

Thanks,  
Vivek

---

<div class="post-metadata">

**Author:** ![Noordsestern](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/noordsestern/32/4270_2.png) [@Noordsestern](https://forum.robotframework.org/u/Noordsestern)\
**Post date:** [23 December 2021 11:47 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/11 "2021-12-23T11:47:04Z")

</div>

Probably, if you can share the test case. There is no _the only 1 reason for data not being written to an excel file_ 😉

---

<div class="post-metadata">

**Author:** ![kulkarnivp](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kulkarnivp](https://forum.robotframework.org/u/kulkarnivp)\
**Post date:** [23 December 2021 12:26 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/12 "2021-12-23T12:26:14Z")

</div>

Please find the test case below-

```python
***Settings***
Library SeleniumLibrary
Library OperatingSystem
Library RPA.Excel.Files

***Test Cases***
Excel Test Case 

    Open Workbook D:\\OutputData.xls
    ${column1}= Get cell value 1 2
    log to console ${column1}
    Set cell value 1 3 Test_Value

```

---

<div class="post-metadata">

**Author:** ![Noordsestern](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/noordsestern/32/4270_2.png) [@Noordsestern](https://forum.robotframework.org/u/Noordsestern)\
**Post date:** [21 January 2022 23:34 UTC](https://forum.robotframework.org/t/read-and-parse-excel-data/937/13 "2022-01-21T23:34:39Z")

</div>

Check out the examples at [Excel.Files — RPA Framework documentation](https://rpaframework.org/libraries/excel_files/)

I think you are missing the `Save Workbook` keyword, thus the modification of the cell is not persistent.
