• Resolved thiagowski

    (@thiagowski)


    Hi,

    I have installed the TablePress Buttons extension on my website so users who visit my website can download tables easily, but the buttons don’t appear.
    I already activated the plugin and put the shortcode [table id=1 datatables_buttons=”excel” /] but the buttons don’t appear on my site.
    What happened?

    The page I need help with: [log in to see the link]

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Please make sure that the “Use DataTables” checkbox on the table’s “Edit” screen is checked. The checkboxes for the individual features can then be turned off.
    Please also clear the cache of your CSS/JS caching and optimization plugin.

    Regards,
    Tobias

    Thread Starter thiagowski

    (@thiagowski)

    It worked, but I was wondering how I can replace these buttons with icons and align them all in the table footer instead of them appearing at the top of the table.

    Thanks Tobias.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    to move them to the footer, you can add this to the “Custom Commands” text field on the table’s “Edit” screen:

    "dom": "lfrtipB"
    

    As for the icons: I recommend to use CSS code to add these as background images to the buttons. For example, you could add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .dataTables_wrapper .buttons-pdf {
      background: ...;
    }

    (This would have to be adjusted to have an image URL.)

    Regards,
    Tobias

    Thread Starter thiagowski

    (@thiagowski)

    Hi Tobias,

    Just one more thing. How can I hide this text and button border and leave only the image?

    Printscreen: https://uploaddeimagens.com.br/imagens/MdRf7Ew

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    please try adding

    .dataTables_wrapper .buttons-pdf span {
      display: none;
    }

    to hide the text, and

    border: none;
    

    to the other CSS block to remove the border.

    Regards,
    Tobias

    Thread Starter thiagowski

    (@thiagowski)

    Hi Tobias,

    All your steps worked.

    But I found a conflict.

    I tried to add the buttons to this table: https://mrs2020.blendon.com.br/relatorio-de-sustentabilidade-2020/sumario-de-conteudo-gri-e-sasb/ and they don’t appear and an error doesn’t appear on my console DataTables.

    • This reply was modified 4 years, 12 months ago by thiagowski.
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    the problem here is that this table uses #rowspan# to merge/connect cells in a column. Unfortunately, the external DataTables JavaScript library and the Buttons Extension are not compatible to that. If you want to use that, you must remove all #rowspan# from the table.

    Regards,
    Tobias

    Thread Starter thiagowski

    (@thiagowski)

    Hi Tobias,

    So I can’t merge columns and cells? Is there any other way to merge correctly? Because I have to follow a graphic model and I need to merge some cells and columns.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, if you want to use any of the JavaScript features, like search, sort, or the buttons, you can not merge columns/cells in this table. It’s just not supported by the external JavaScript library that TablePress uses. Sorry for not having better news here.

    Regards,
    Tobias

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

The topic ‘TablePress does not show export buttons’ is closed to new replies.