# Input Text from Excel Not working

**URL:** <https://forum.robotframework.org/t/input-text-from-excel-not-working/5671>\
**Category:** Robot Framework\
**Created:** [9 May 2023 01:52 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671 "2023-05-09T01:52:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![robocorp19](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@robocorp19](https://forum.robotframework.org/u/robocorp19)\
**Post date:** [9 May 2023 01:52 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/1 "2023-05-09T01:52:09Z")

</div>

Hi, I am using RPA.Browser.Selenium trying to input date from excel. The date will input first day of the month, and last day of the month.

In my excel I set it as first image below.

But when I try to Input text, it only input as second image below. Any advise?

Input Text id=[fromdate] ${myexcel}[FromDate] %m/%d/%Y

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/f/f8aa4b421ddf4a59aca474e161a343f20dfe4ec1.png)

---

<div class="post-metadata">

**Author:** ![\_daryl](https://avatars.discourse-cdn.com/v4/letter/_/45deac/32.png) [@\_daryl](https://forum.robotframework.org/u/_daryl)\
**Post date:** [9 May 2023 11:16 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/2 "2023-05-09T11:16:11Z")

</div>

Hi

What Excel library are you using?

What you may find (I also had the same issue) the library might not be able to read the value being returned from the formula, the only workaround I could do for the chosen Excel library I’m using due to needing the read/write/save features and supporting .xlsx the library offered, was to format the spreadsheet first in the first instance… so Id copy all contents of a sheet, paste special and then paste back to the original sheet, so kind of a “pre-test setup” to ensure the data was in a format the library would be able to read, due to that limitation.

Apart from that, it’s worth exploring the library docs to see if it supports read where a formula is being used to return a value.

Hope that at least helps, but looks very similar to the issue I had come up against in the past.

---

<div class="post-metadata">

**Author:** ![robocorp19](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@robocorp19](https://forum.robotframework.org/u/robocorp19)\
**Post date:** [10 May 2023 01:44 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/3 "2023-05-10T01:44:08Z")

</div>

I am using RPA.Excel.Files library.

---

<div class="post-metadata">

**Author:** ![vgg2503](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@vgg2503](https://forum.robotframework.org/u/vgg2503)\
**Post date:** [11 May 2023 08:25 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/4 "2023-05-11T08:25:52Z")

</div>

I’m not able to read csv testdata file. Please correct me where I’m wrong.

robot file:  
_ **Settings** _  
Resource resource.robot  
Library OperatingSystem  
Library String  
Library DataDriver testSheet/TestData.csv  
Test Template testingCSVTestData

Suite Setup Initialize  
Suite Teardown Disable

_ **Keywords** _

testingCSVTestData  
[Arguments] ${cl1} ${cl2}  
Log To Console ${c1} → ${cl2}

_ **Test Cases** _  
testcase1 ${cl1} ${cl2}

#########CSV file################  
${cl1};${cl2};  
abc;123;  
xyz; 234;

---

<div class="post-metadata">

**Author:** ![\_daryl](https://avatars.discourse-cdn.com/v4/letter/_/45deac/32.png) [@\_daryl](https://forum.robotframework.org/u/_daryl)\
**Post date:** [11 May 2023 10:23 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/5 "2023-05-11T10:23:41Z")

</div>

@vgg2503

Please see the supporting [documentation](https://rpaframework.org/libraries/excel_files/)  
From what it reads:

> _It supports both legacy .xls files and modern .xlsx files._

---

<div class="post-metadata">

**Author:** ![vgg2503](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@vgg2503](https://forum.robotframework.org/u/vgg2503)\
**Post date:** [11 May 2023 10:30 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/6 "2023-05-11T10:30:19Z")

</div>

Documentation is about read xls/clsx worksheet in general.  
My requirement is to read testdata from csv/xls.  
for which I tried using DataDriver library with “Test Template” Keyword.  
It always gives below error:

```
         "Variable '${c1}' not found."

```

I also trried same using xls \>  
"Library DataDriver testSheet/TestData.xls sheet=Sheet1 "

Still results are same.

Sample csv testdata file looks like:  
${cl1};${cl2};  
abc;123;  
xyz; 234;

---

<div class="post-metadata">

**Author:** ![\_daryl](https://avatars.discourse-cdn.com/v4/letter/_/45deac/32.png) [@\_daryl](https://forum.robotframework.org/u/_daryl)\
**Post date:** [11 May 2023 10:42 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/7 "2023-05-11T10:42:02Z")

</div>

> [@vgg2503](#):
>
> DataDriver

Oh… okay, sorry as you commented on a post that was related to RPA.Excel to oppose a fresh post, I hadn’t noticed the Library DataDriver from your snippet and replied on the assumption you were using the same library, generally tho, you are limiting any responses from others that may have a lot more experience with DataDriver this way, as you’ll be able to specify a title for your own post that will draw in those.

Unfortunately, I don’t have any experience with DataDriver

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [13 May 2023 00:48 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/8 "2023-05-13T00:48:36Z")

</div>

Hi Vishal,

I recently posted a working example of DataDriver library with a csv file:

> [@Looping Reference](https://forum.robotframework.org/t/looping-reference/5652/14):
>
> Hi Fadhli, I built a simple example for you, you can use this as a template, build your payload and send your request to the server inside the Data Driver Example keyword. But before you do that, just recreate these two file, run robot dd\_example.robot and confirm you get the same result I did: dd\_example.robot \*\*\* Settings \*\*\* Library DataDriver file=dd\_example.csv dialect=unix Test Template Data Driver Example \*\*\* Test Cases \*\*\* Dummy Test ${loan\_id} ${i\_name\_borrower} ${…

You can take that example, run it to see how it works and then modify it to your needs.

I simply followed the documentation to create the example. once you have it working you should be able to import the csv into a excel file and follow the documentation to change the `Library DataDriver` line to import the excel file.

Hope that helps,

Dave.

---

<div class="post-metadata">

**Author:** ![vgg2503](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@vgg2503](https://forum.robotframework.org/u/vgg2503)\
**Post date:** [13 May 2023 05:01 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/9 "2023-05-13T05:01:25Z")

</div>

I guess I figured out the issue. Datadriver library is missing in my installation but since line: “Library Datadriver” was not giving any error , I got confused. That’s why my cab variables are not know to my robot testcases.  
Is there an easy copy paste way to get Datadriver Library, as I can’t easily install (run pip ) on my office system?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [13 May 2023 11:06 UTC](https://forum.robotframework.org/t/input-text-from-excel-not-working/5671/10 "2023-05-13T11:06:33Z")

</div>

Hi Vishal,

The best thing to do is configure your system so that pip can use your proxy server

> <https://stackoverflow.com/questions/43473041/how-to-configure-pip-per-config-file-to-use-a-proxy-with-authentification>

Failing that, you can [download the tar.gz and whl files](https://pypi.org/project/robotframework-datadriver/#files) and tell pip to install from the local files, but you will need to get the [prerequisites](https://github.com/Snooz82/robotframework-datadriver/blob/main/setup.py) as well, for datadriver it looks like you’ll need:

```python
    install_requires=["robotframework >= 4.0.2", "docutils", "Pygments"],
    extras_require={"xls": ["pandas", "xlrd >= 1.2.0", "openpyxl"]},

```

Using a proxy server is really much easier, I’ve done it both ways, the catch with the manual downloads, is you need to also check the prerequisites for each of those prerequisites, and then the prerequisites of their prerequisites and so on till you have all the prerequisites packages you need to install the original package, where if you just configure the proxy pip does all that for you.

Dave.

Dave.
