Okay
  Public Ticket #3538496
export wpdtatable
Closed

Comments

  • Gloria started the conversation

    Hello,

    when i export a wpdatatable made with a mysql query to a CSV or a Pdf file,  i only see in the exported file the columns that are actually displayed in the table . Is it possible to export all the columns including those that are not shown in the wpdatatable. 

    Example : the mysql query is "SELECT field1, field2, field3 from mytable"

    In the wpdatable configuration, i only display field1 and field2. But in the export file, i want to have all the three fields.

    I tried to use the css rule "display:none" but it does not work, the column is disregarded in the export file.

    Best regards

  •  1,708
    Miloš replied


    Hi Gloria,

    1. First we will just point out some general Limitations for our Export Tools :

    The table tools functionalities are based on a 3rd party HTML5 library and they are not customizable. 

    There are some limitations in this library we will emphasize for your awareness:

     If you want the entire table to be exported while having "server side" feature enabled in it (or copied to a clipboard), you need to choose the “Show All” option in the “show … entries” block, and then do the export:6992668217.png

    • Generated PDF, XLS, CSV are not customizable. Unfortunately, the library allows very little “fine-tuning” of the generated files, so font, size, and other properties cannot be changed (but the title can – see below).
    • Conditional formatting is not reflected in any of generated export files.
    • Other front-end extensions cannot be combined with Table Tools. If you have row grouping enabled for the table, or there are some customizations you did yourself, they won’t be reflected in the generated Excel, CSV or PDF document, nor in the clipboard.
    • When you export tables with the wpDataTables plugin, please note that you can export values, but not formulas. WpDataTables doesn’t support exporting formulas, so a Formula column will be exported only with values; and any calculations of Average, MIN, MAX, and Total will not be exported at all.
    • Exporting images is not possible at the moment, but you are able to export them as HTML with the new “Include HTML” option.
    • You can not export columns that are hidden – they will not be visible in any exporting or printing tool.
    • Export numbers with comma as decimal separators have issues in the Excel report. Please use the CSV export button or change column type to string for these columns.

    -

    If you need better PDF export options, our advice would be to acquire something like the WP Advanced PDF plugin, which offers a lot more options when creating PDF files from our tables, along with other content on your website.


    So, as you can see, in one of those limitations, it is not possible to export any column you might have hidden - whether if it was by hiding it from the Column settings;

    or if you use CSS to hide it - our Export Tools will only show the visible Columns from a Table.

    At the moment,we don't have any way to change that, but you can make a development suggestion.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.



    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables