# Problem import excel file in pavlovia

**URL:** <https://discourse.psychopy.org/t/problem-import-excel-file-in-pavlovia/23444>\
**Category:** Coding\
**Tags:** pavlovia\
**Created:** [June 8, 2021, 12:12pm UTC](https://discourse.psychopy.org/t/problem-import-excel-file-in-pavlovia/23444 "2021-06-08T12:12:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![romane](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@romane](https://discourse.psychopy.org/u/romane)\
**Post date:** [June 8, 2021, 12:12pm UTC](https://discourse.psychopy.org/t/problem-import-excel-file-in-pavlovia/23444/1 "2021-06-08T12:12:04Z")

</div>

Hello everyone!

**Problem:**  
I have to put my first experiment into Pavlovia for an online passation.  
For now, I use the xlrd method to import my excel file containing variables **but** , I read that the `xlrd` method doesn’t work on Pavlovia…

**Questions:**  
1/ Does the `xlrd` method (as below) really not work on Pavlovia?

```auto
import xlrd
in_file = 'my_file.xlsx'
inbook = xlrd.open_workbook(in_file)
insheet = inbook.sheet_by_index(0)

```

2/ And, if its doesn’t work, Should I use the `trialhandler` method?  
(I don’t master this method…)

Thank you very much for your help!!  
Romane

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 8, 2021, 12:21pm UTC](https://discourse.psychopy.org/t/problem-import-excel-file-in-pavlovia/23444/2 "2021-06-08T12:21:52Z")

</div>

You can just use a Builder loop.

For example, take a look at my [Independent Randomisation demo](https://discourse.psychopy.org/t/psychopy-online-demos/22319#independent-randomisation-codehttpsgitlabpavloviaorgvesprindependent-randomisation-try-ithttpsrunpavloviaorgvesprindependent-randomisation-6).
