# Excel data to html table

**URL:** <https://discourse.nodered.org/t/excel-data-to-html-table/39203>\
**Category:** General\
**Created:** [15 January 2021 22:35 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203 "2021-01-15T22:35:32Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaberiel](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Gaberiel](https://discourse.nodered.org/u/Gaberiel)\
**Post date:** [15 January 2021 22:35 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/1 "2021-01-15T22:35:33Z")

</div>

Hi everyone;  
How can I convert excel data to an HTML table?

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [16 January 2021 14:12 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/2 "2021-01-16T14:12:16Z")

</div>

Hi,  
What did you try?

Have a look at the [node-red-contrib-spreadsheet-in](https://flows.nodered.org/node/node-red-contrib-spreadsheet-in) node.  
Play with it in combination with something like [node-red-contrib-jsontohtml](https://node-red-contrib-jsontohtml).  
And with some effort you will succeed .

---

<div class="post-metadata">

**Author:** ![Gaberiel](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Gaberiel](https://discourse.nodered.org/u/Gaberiel)\
**Post date:** [16 January 2021 20:14 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/3 "2021-01-16T20:14:10Z")

</div>

I'm trying to convert excel data to html file ..but I get this error  
 ![er](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4f7f71b8d06d68fe64f5b83060aaf5731b691a4a.png)

here is my flow:

 ![exc](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fd2b39ddc2dbfc66b40d193acc50fa5eccce99a9.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 January 2021 21:46 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/4 "2021-01-16T21:46:35Z")

</div>

Is that a File In node you are reading it with? Have you used a debug node to see what it looks like coming out of the file? Is it JSON?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [16 January 2021 21:49 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/5 "2021-01-16T21:49:56Z")

</div>

An xls file is a binary format. You cannot simply read the file data and send it to a JSON node. It just won't work.

To confirm what I am saying, use a debug node as @Colin suggests.

Did you try the suggestions by @edje11?

---

<div class="post-metadata">

**Author:** ![Gaberiel](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Gaberiel](https://discourse.nodered.org/u/Gaberiel)\
**Post date:** [16 January 2021 22:15 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/6 "2021-01-16T22:15:49Z")

</div>

no not JSON

 ![n](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/5426907e0676d7d7ab3e9212b1ff142361aa04f3.png)

---

<div class="post-metadata">

**Author:** ![Gaberiel](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Gaberiel](https://discourse.nodered.org/u/Gaberiel)\
**Post date:** [16 January 2021 22:19 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/7 "2021-01-16T22:19:52Z")

</div>

HI @edje11 ..the second link doesn't work

> [@edje11](#):
>
> Play with it in combination with something like [node-red-contrib-jsontohtml](https://node-red-contrib-jsontohtml).

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [16 January 2021 22:36 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/8 "2021-01-16T22:36:36Z")

</div>

> [@Gaberiel](#):
>
> .the second link doesn't work

its in the flows library - same as the first link

> **[node-red-contrib-jsontohtml](https://flows.nodered.org/node/node-red-contrib-jsontohtml)**
>
> A Node Red node for converting json to html

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 January 2021 07:21 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/9 "2021-01-17T07:21:15Z")

</div>

You have to read the spreadsheet first, using a node that understand Excel, which is what the first link was for.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 January 2021 07:22 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/10 "2021-01-17T07:22:09Z")

</div>

> [@Gaberiel](#):
>
> no not JSON

Not much point feeding it into a JSON node then!

---

<div class="post-metadata">

**Author:** ![Gaberiel](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Gaberiel](https://discourse.nodered.org/u/Gaberiel)\
**Post date:** [17 January 2021 14:21 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/11 "2021-01-17T14:21:17Z")

</div>

Oh yeah, my bad ..I used node-red-contrib-spreadsheet-in package then "tableify" node and it's working..  
Thank you @Colin & @Steve-Mcl & @edje11

---

<div class="post-metadata">

**Author:** ![Gaberiel](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Gaberiel](https://discourse.nodered.org/u/Gaberiel)\
**Post date:** [19 January 2021 16:13 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/12 "2021-01-19T16:13:27Z")

</div>

Here is my flow of others who need an example

```auto
[{"id":"9d4b3531.391338","type":"inject","z":"b00215d0.601ab8","name":"","repeat":"","crontab":"","once":false,"topic":"","payload":"","payloadType":"str","x":70,"y":100,"wires":[["1ef482ff.54be1d"]]},{"id":"1ef482ff.54be1d","type":"file in","z":"b00215d0.601ab8","name":"read a spreadsheet file as binary buffer","filename":"file_example_XLS_10.xls","format":"","chunk":false,"sendError":false,"x":310,"y":100,"wires":[["58da0822.79c4a8"]]},{"id":"58da0822.79c4a8","type":"book","z":"b00215d0.601ab8","name":"","x":270,"y":160,"wires":[["ed8b8fb2.0d17c"]]},{"id":"ed8b8fb2.0d17c","type":"sheet","z":"b00215d0.601ab8","name":"","sheetName":"Sheet1","x":330,"y":200,"wires":[["9c0ed110.bc235"]]},{"id":"9c0ed110.bc235","type":"sheet-to-json","z":"b00215d0.601ab8","name":"","raw":"false","range":"","header":"A","blankrows":true,"x":430,"y":240,"wires":[["3870180.425bde8"]]},{"id":"2dad414b.f976fe","type":"e-mail","z":"b00215d0.601ab8","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"","dname":"Email","x":670,"y":260,"wires":[]},{"id":"3870180.425bde8","type":"tableify","z":"b00215d0.601ab8","name":"","before":"","after":"","tableStyle":"","theadStyle":"","tbodyStyle":"","trStyle":"","tdStyle":"","x":500,"y":280,"wires":[["2dad414b.f976fe","9480b253.bcdbd"]]},{"id":"9480b253.bcdbd","type":"debug","z":"b00215d0.601ab8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":320,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 February 2021 16:13 UTC](https://discourse.nodered.org/t/excel-data-to-html-table/39203/13 "2021-02-02T16:13:28Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
