Title: Problems Importing Html
Last modified: August 20, 2016

---

# Problems Importing Html

 *  Resolved [TechTransAU](https://wordpress.org/support/users/techtransau/)
 * (@techtransau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problems-importing-html/)
 * Hi Tobias/anyone else,
    Sorry to bother you with this but after half a day of
   trying various options I was hoping to get some advice. I have a table which 
   I maintain and, as I update it, want to place updated copies on a wordpress page.
   Data entry through tablepress itself is a little too clumsy (no offence intended!)
   so I have tried it using MS Word, Excel, Google Doc and Google spreadsheet, but
   the output html always throws up errors when I try to import it through tablepress.
   Tablepress clearly requires very “clean” html. Are there any “office” products
   that you know of that I can use to maintain my table, that do create html output
   that is clean enough for tablepress, or any way in which I can clean it up so
   it is acceptable to tablepress? Note the reason I am so keen on html is that 
   I have hyperlinked urls, in the table data, and I thise get lost when I try to
   do this through .csv. Many thanks, Charles
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571083)
 * Hi Charles,
 * thanks for your post, and sorry for the trouble.
 * Yes, the HTML import into TablePress is quite strict (as the internal PHP functions
   that are used for this are quite strict), and the HTML files that are generated
   by those spreadsheet programs can unfortunately be very complicated.
 * To find out more, could you clarify or give example of what errors you get? Also,
   can I see that Excel file somewhere? (If you want, you can email it to me, my
   address is in the main plugin file “tablepress.php”).
 * Regards,
    Tobias
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571139)
 * Hi,
 * for everybody following this thread: I had a look at some files that Charles 
   sent me.
    Unfortunately, all that I can suggest for now is to keep the Excel 
   file as simple as possible, and to not use sophisticated features in Excel, like
   scrolling rows. Everything that’s unrelated to the data should not be used, to
   make the Excel file and with that the exported HTML file as simple as possible.
   This should give an easy to import HTML file, in most cases. If errors remain
   then, it is sometimes possible to manually fix/remove them, by editing the HTML
   in a text editor.
 * Regards,
    Tobias
 *  [vector40](https://wordpress.org/support/users/vector40/)
 * (@vector40)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571143)
 * Tobias,
 * After several exhausting days, I think I’ve pinned down an isolated bug in the
   HTML import. I’m sure there are other reasons it will kick up an error, but in
   this case, it’s related to length: if I keep the import under a certain size (
   not clear if it’s file size, number of characters, or if characters in-cell vs
   markup makes a difference — I’ve been adding in-cell content to test) it imports
   fine, if it’s any bigger it fails with a “Data for the import is invalid” message.
 * Here’s a painstakingly derived test case: [http://degreesofclarity.com/emsbasics/goodshort.html](http://degreesofclarity.com/emsbasics/goodshort.html)
 * This imports without a problem. However, if you add a single additional character
   to any cell (spaces count), it fails.
 * Thoughts?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571144)
 * Hi,
 * thanks for this investigation, but the error that you are experiencing is different
   to that of the original poster.
 * The original poster gets errors about the internal structure/HTML format. In 
   your case, the error is raised before the actual import is done. Therefore, my
   assumption is that this is indeed related to the size of the file. And I think
   that the import fails because there’s some sort of size limit on your server,
   e.g. for the uploading or for the temporary storage after the download. Could
   that be possible?
    That’s my conclusion because the file works fine on my test
   server, and I can add extra content to the cells or even new rows without problems.
 * Regards,
    Tobias
 *  [vector40](https://wordpress.org/support/users/vector40/)
 * (@vector40)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571157)
 * Jeepers. You’re right, it’s working for me now as well. Suffice to say that it’s
   an inconsistent issue.
 * Incidentally, for anybody who’s also working with generated HTML, the Textism
   Wordcleaner does a quite good job of getting your code into a workable state (
   [http://textism.com/wordcleaner/](http://textism.com/wordcleaner/)).
 * As a long term solution, what’s the chance of a more robust HTML import somewhere
   in the future? There are clearly a number of us having issues.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571158)
 * Hi,
 * good to hear that you were successful in importing the HTML file!
 * And thanks for that link, that should indeed be valuable to other users as well!
 * About the more robust HTML import: TablePress is using functions that are available
   in PHP, for HTML and XML parsing. Unless those get more robust, I don’t foresee
   a change in the current behavior. Other solutions would mean to write a custom
   HTML parsing, but that’s not something that I’m capable of doing.
    Instead, I’m
   planning to add import from Excel files (.xsls), which can mabye help in working
   around HTML import problems.
 * Regards,
    Tobias
 *  [vector40](https://wordpress.org/support/users/vector40/)
 * (@vector40)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571159)
 * Thank you — I think that would help. And thanks in general; despite the non-step
   demands, I know we’re all deeply thankful for your generous work with this project.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571160)
 * Hi,
 * no problem! 🙂 Thanks for the nice words, I really appreciate it!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Problems Importing Html’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/problems-importing-html/#post-3571160)
 * Status: resolved