# Problem with Robot Framework and Excel

**URL:** <https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362>\
**Category:** DataDriver\
**Created:** [12 June 2020 20:09 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362 "2020-06-12T20:09:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TRoper](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@TRoper](https://forum.robotframework.org/u/TRoper)\
**Post date:** [12 June 2020 20:09 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/1 "2020-06-12T20:09:05Z")

</div>

Hi,

I have installed Robotframework, PyCharm, Intellibot, Selenium using PIP3 on a MAC. No problems.  
Then I installed robotframework-datadriver both through PyCharm and with PIP3.

In a test script i have included the necessary files in _ **Settings** _ using:

```python
    library datadriver TestData/TestData.xlsx sheet_name=Sheet1

```

Then when I run the test, I get an error "Importing test library ‘datadriver’ failed: ModuleNotFoundError: No module named ‘datadriver’

Any ideas what I am doing wrong?

I am following Software Testing Mentor " Robot Framework Tutorial #42 - How to do Data Driven Testing using Excel File" on youtube.

Thanks

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [12 June 2020 23:50 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/2 "2020-06-12T23:50:25Z")

</div>

Hi Steve,

Welcome to the forum!

You did wrote  
`library datadriver`  
But Library import is always case sensitive in RobotFramework

You have to write  
`Library DataDriver`

And by the way:  
If you use the first sheet, you do not have to name it anyway. It just picks the first sheet.

Have fun!

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [12 June 2020 23:58 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/3 "2020-06-12T23:58:25Z")

</div>

> [@TRoper](#):
>
> #42 - How to do Data Driven Testing using Excel File"

I was thinking: “what is he watching? 😳”  
Now i had a look to that video. 😂  
Hey that is somehow weird that someone makes a tutorial on Youtube about a library i wrote…

I did also do a talk at RoboCon 2020 about DataDriver.

[![](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/1/1bac299a5c8d9262ec994b10ad35556cce3e81d2.jpeg "René Rohner - DATADRIVER OR: HOW I LEARNED TO STOP WORRYING AND LOVE OPEN SOURCE") ](https://www.youtube.com/watch?v=RtEUr1i4x3s)

It is more about the background and does not slowly explain each step, but maybe it is interesting.

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [13 June 2020 00:08 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/4 "2020-06-13T00:08:11Z")

</div>

By the way, when you just followed the tutorial, you habe to add Excel support as well.  
It is not longer included.

Just execute  
`pip install --upgrade robotframework-datadriver[XLS]`  
In your Terminal.

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [13 June 2020 00:20 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/5 "2020-06-13T00:20:54Z")

</div>

And i saw he has warning there because of duplicate test name.  
This can be changed by defining the test case name.

> <https://github.com/Snooz82/robotframework-datadriver/blob/master/Readme.rst#example-data-file>

---

<div class="post-metadata">

**Author:** ![TRoper](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@TRoper](https://forum.robotframework.org/u/TRoper)\
**Post date:** [15 June 2020 19:17 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/6 "2020-06-15T19:17:25Z")

</div>

Rene,

Thank you very much for the responses to my problem. I am trying very hard to get Robot Framework to work.

The link you provided does not work.

Thank You

Steve McGuffin (TRoper)

![Screen Shot 2020-06-15 at 7.10.35 AM.png](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/e2f47bede9d8fbfea8cf5caa31b8b4f4634a5cf0.png)

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [15 June 2020 21:52 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/7 "2020-06-15T21:52:10Z")

</div>

> **[Snooz82/robotframework-datadriver](https://github.com/Snooz82/robotframework-datadriver)**
>
> Library to provide Data-Driven testing with CSV tables to Robot Framework - Snooz82/robotframework-datadriver

---

<div class="post-metadata">

**Author:** ![vvkrnk](https://avatars.discourse-cdn.com/v4/letter/v/ba8739/32.png) [@vvkrnk](https://forum.robotframework.org/u/vvkrnk)\
**Post date:** [19 August 2021 21:10 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/8 "2021-08-19T21:10:15Z")

</div>

Hi Rene  
`Library DataDriver file=../resources/data/testData/ExAnteTestData.xlsx`

I am specifying my excel path but still it is considering .csv in the same directory with the file name (as if no filename was specified)

Did `pip install --upgrade robotframework-datadriver[XLS]`  
got version 1.4.1 using python 3.7

---

<div class="post-metadata">

**Author:** ![vvkrnk](https://avatars.discourse-cdn.com/v4/letter/v/ba8739/32.png) [@vvkrnk](https://forum.robotframework.org/u/vvkrnk)\
**Post date:** [20 August 2021 09:00 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/9 "2021-08-20T09:00:54Z")

</div>

Hi, I identified the reason - I was using `Library DataDriver` in the resource file which was imported in my test file. I just had to remove this line from .recource file and it worked!

---

<div class="post-metadata">

**Author:** ![priti0987](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/priti0987/32/1699_2.png) [@priti0987](https://forum.robotframework.org/u/priti0987)\
**Post date:** [18 July 2022 13:21 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/10 "2022-07-18T13:21:09Z")

</div>

How to write into excel file using datadriver library

---

<div class="post-metadata">

**Author:** ![robinmackaij](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/robinmackaij/32/126_2.png) [@robinmackaij](https://forum.robotframework.org/u/robinmackaij)\
**Post date:** [14 August 2022 16:43 UTC](https://forum.robotframework.org/t/problem-with-robot-framework-and-excel/362/11 "2022-08-14T16:43:53Z")

</div>

DataDriver is not designed to write to Excel. You’ll have to use another library for that.
