# Save HTML table values to Excel

**URL:** <https://forum.robotframework.org/t/save-html-table-values-to-excel/6256>\
**Category:** Robot Framework\
**Created:** [26 September 2023 18:13 UTC](https://forum.robotframework.org/t/save-html-table-values-to-excel/6256 "2023-09-26T18:13:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant.patel](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@prashant.patel](https://forum.robotframework.org/u/prashant.patel)\
**Post date:** [26 September 2023 18:13 UTC](https://forum.robotframework.org/t/save-html-table-values-to-excel/6256/1 "2023-09-26T18:13:00Z")

</div>

My HTML table has 6 columns and 15 rows. I am using RF 6.1.1 & Python 3.9.13.

${rows}= get element count //table[@id=“issuetable”]/tbody/tr  
${cols}= get element count //table[@id=“issuetable”]/thead/tr[1]/th

**# Creating a List and append the value**  
@{list} = Create List  
@{myelements}= Get WebElements //table[@id=“issuetable”]/tbody/tr/td  
FOR ${element} IN @{myelements}  
${text}= Get Text ${element}  
Append To List ${list} ${text}  
END

**Loop the List**  
FOR ${value} IN @{list}  
log to console ${value}  
END

**How do I save list value to an Excel?**

---

<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:** [27 September 2023 06:49 UTC](https://forum.robotframework.org/t/save-html-table-values-to-excel/6256/2 "2023-09-27T06:49:54Z")

</div>

Hi Prashant,

It depends on the level of Excel-ness you need

- if you just need to be able to open the file containing the data easily in excel and don’t need any formatting, formulas or other more advanced features, then saving as simple text file might do?  
I’d suggest saving as tab separated values (tsv file) as excel will happily this type of text file as though it were a single sheet spreadsheet.  
This can be done with [OperatingSystem](https://robotframework.org/robotframework/latest/libraries/OperatingSystem.html)’s file functions so no need to install anything (great for portability)

- if you need more than just raw data then [robotframework-excel](https://github.com/zero88/robotframework-excel) will probably do what you need.  
This will need to be installed on all machines you need to run the test on.

Dave.

---

<div class="post-metadata">

**Author:** ![prashant.patel](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@prashant.patel](https://forum.robotframework.org/u/prashant.patel)\
**Post date:** [15 October 2023 15:31 UTC](https://forum.robotframework.org/t/save-html-table-values-to-excel/6256/3 "2023-10-15T15:31:25Z")

</div>

Thank you Dave
