Support » Plugin: TablePress » Import > Manual Input > Append rows = “Error: The data for the import is invalid

  • Resolved shawns52

    (@shawns52)


    Hello, I’ve been using this fantastic plugin for a few years but now find that I want to add a row to the bottom of most of the tables. I’ve been trying to use the Import function, select Manual Input and HTML for the format. But I don’t know what format the HTML needs to be in to append to an existing table.

    This is what I’ve tried so far but I get the error that the import is invalid. Any thoughts, thanks!!

    <tr class=”row-7″>
    <td colspan=”2″ class=”column-2″><div align=”center” id=”example1″>Discuss this title in the TITLE</div></td>
    </tr>

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Even for an “append” the import data needs to be HTML code for a full table, i.e. there needs to be a <table> element around your code.
    In addition, the number of columns in the existing table and in the new table data must be the same.

    Regards,
    Tobias

    Got it! Adding <table> around my example HTML worked perfectly. One more question now, how can I add #rowspan# to column 1 for the new row I am adding? Thanks again!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    what cell do you want to merge it with? The #rowspan# keyword has to be in the cell below the one that has the content for the merged cell.

    And: Why are you actually using the import with append here? You could just append new (empty) rows on the table’s “Edit” screen.

    Regards,
    Tobias

    This visual might explain better. The bottom row is what I want to append to each table, the result is on the right. Column 1 needs rowspan added and then the new row needs colspan to the right.

    https://imgur.com/QXrOOzZ

    I have done a few manually like you suggested but then noticed the append and thought it might go a little quicker without having to navigate to each table and then copy/paste data into 3 cells.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, ok. Indeed, if you are doing this for multiple tables, the import method should be quicker.

    As for the #rowspan# and #colspan#: Just add these as the content of the cells of the imported table, nothing special necessary.

    Regards,
    Tobias

    Doh! I just realized I could export an existing table as well. I got the HTML in the right format to then import and append like I was looking for.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.