# Handle two or more LibreOffice Calc sheets with loadTable() statement

**URL:** <https://discourse.processing.org/t/handle-two-or-more-libreoffice-calc-sheets-with-loadtable-statement/4268>\
**Category:** Processing\
**Created:** [October 9, 2018, 6:33am UTC](https://discourse.processing.org/t/handle-two-or-more-libreoffice-calc-sheets-with-loadtable-statement/4268 "2018-10-09T06:33:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dennis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dennis/32/1111_2.png) [@Dennis](https://discourse.processing.org/u/Dennis)\
**Post date:** [October 9, 2018, 6:33am UTC](https://discourse.processing.org/t/handle-two-or-more-libreoffice-calc-sheets-with-loadtable-statement/4268/1 "2018-10-09T06:33:33Z")

</div>

Hi, i’m looking for a way to handle a file .ods which contains more sheets. In the loadTable() documentation i don’t find how to do… my intent is something like:

```auto
table = loadTable("example");
s = table.sheet("sheet2");

```

… maybe i’m on the wrong way?

regards!  
Dennis

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [October 14, 2018, 4:16am UTC](https://discourse.processing.org/t/handle-two-or-more-libreoffice-calc-sheets-with-loadtable-statement/4268/2 "2018-10-14T04:16:49Z")

</div>

@Dennis – I think that `loadTable()` works with plain text formats like CSV and TSV. So what you would do is export the ODS worksheets to separate csv files – sheet1.csv, sheet2.csv, sheet3.csv – and then import each with loadTable.

If you want a combined object to access them, then you can create a `Table[] sheets` array object and load your sheets with loadTable into sheets[0], sheets[1], sheets[2]… now you can access it like this:

```auto
Table[] sheets = new Table[3];
sheets[2] = loadTable("sheet2.csv");

s = sheets[2];
s.getRow(10).getInt(2);

```

or

```auto
sheets[2].getRow(10).getInt(2);

```

---

<div class="post-metadata">

**Author:** ![Dennis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dennis/32/1111_2.png) [@Dennis](https://discourse.processing.org/u/Dennis)\
**Post date:** [October 14, 2018, 7:00am UTC](https://discourse.processing.org/t/handle-two-or-more-libreoffice-calc-sheets-with-loadtable-statement/4268/3 "2018-10-14T07:00:16Z")

</div>

Thank you, I try it !!!👍
