• Hello

    I’m having an issue with tablepress recently in that any tables that have HTML, for example if it includes a cell like this:

    <a href="http://www.google.com">Test</a>

    It will break the complete table that is imported (from a google sheet). The imported table and shows something like this:

    https://i.gyazo.com/f529648ddeb85b7eeff0cfd7558dde11.png

    Any suggestions to fix this are appreciated.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    From what I can see, you are not importing a plain CSV file here, but some more sophisticated HTML file from Google. To import from Google Spreadsheets, you must use the public link that directly delivers a CSV file.

    Regards,
    Tobias

    Thread Starter Elliot Sowersby

    (@elliotvs)

    Hi Tobias

    Thanks for the reply.

    In the “Auto Import Tables” settings, for each table in the “source” field we have the link to the google spreadsheets URL that delivers the CSV.

    This is setup and working for some of the tables perfectly fine, those of which all seem to not include any HTML in the fields. Whilst the tables on google sheets that include some HTML such as “Test” seems to break like the screenshot I included.

    The google spreadsheets URL that is being used in the “source” field for example is something like this:
    https://docs.google.com/spreadsheets/d/e/2PACX-1vQ*spreadsheetid*/pub?gid=12345&single=true&output=csv

    Any suggestions appreciated.

    Thanks.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    can you send me an actual (working) link to such a spreadsheet URL? From the screenshot it simply appears that no CSV file was returned, as that screenshot clearly shows HTML code.

    Regards,
    Tobias

    Thread Starter Elliot Sowersby

    (@elliotvs)

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link! That’s what I mean, this link does not directly return a CSV representation of the table, but the full editing user interface from Google. You will have to find the share/export link from Google that directly returns a CSV file without any editing interface and without having to log in.

    Regards,
    Tobias

    Thread Starter Elliot Sowersby

    (@elliotvs)

    Thanks, the URL provided is just an example. I can’t share the actual sheet at is has some provide stuff. But the google sheet has multiple tabs/sheets, and using the API CSV URL in the auto import “Source”, which is something like:

    https://docs.google.com/spreadsheets/d/e/2PACX-*docid*/pub?gid=*gid*&single=true&output=csv

    This allows a CSV file to be download without login.

    This format is used for all the sheets, but it seems it’s just the sheets that have HTML in them that don’t import properly and show something like this:

    https://i.gyazo.com/d0e999ad5b968b05b512a93ab9693346.png

    Thanks!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    can you then send an affected CSV link via email (my address is in the main plugin file “tablepress.php”)? The imported data clearly is a full HTML page, so that CSV link apparently is not returning a CSV file directly…

    Regards,
    Tobias

    Thread Starter Elliot Sowersby

    (@elliotvs)

    Sure, thanks. I’ve sent an email.

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

The topic ‘Import tables with HTML breaks’ is closed to new replies.