TableTools 'sMessage' is not work for csv and xls (but sPdfMessage works);no buttons in Real-time pr

TableTools 'sMessage' is not work for csv and xls (but sPdfMessage works);no buttons in Real-time pr

olirnolirn Posts: 2Questions: 0Answers: 0
edited March 2013 in TableTools
For TableTools:
In http://www.datatables.net/extras/tabletools/button_options# there is 'Print button options' section, and when I click to
'Show details' for sMessage, then click to 'Run in JS Bin'. In the opened page there is table preview, but no button 'Print'.

In another 'Real-time preview' (http://live.datatables.net) there are also no buttons ( for e.g., 'aButtons').
But if we will see buttons, text for 'sMessage' we does not see for csv and xls.
In another, my project-related case, this option (custom text in exported file after 'sMessage' parameter) is also not worked - no custom message in exported 'csv' or 'xls' files. Only 'sPdfMessage' working as expected. I worked with the last '2.1.4' version of TableTools.js

Replies

  • olirnolirn Posts: 2Questions: 0Answers: 0
    Hello allan, all !

    I have checked working 'sMessage' with TableTools-2.1.5, but for csv and xls this parameter is ignored - no my custom message in imported files. Only data from table.

    [code]var oTableTools = new TableTools( oTable, {
    'aButtons': [ { 'sExtends': 'xls', 'sMessage': 'My custom xls message', 'sButtonText': 'To Excel' }, { 'sExtends': 'csv', 'sMessage': 'My custom csv message', 'sButtonText': 'To CSV' } ],
    'sSwfPath': '/app/resources/swf/copy_csv_xls_pdf.swf'
    } );
    jQuery('#placeForExportButtons').html(oTableTools.dom.container);
    [/code]

    Any ideas ?
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    The `sMessage` option is not used for the CSV and XLS buttons because it cannot be represented in CSV. It is a print only option, as detailed in the documentation page you linked to.

    Allan
This discussion has been closed.