Export to excel works in ie, firefox, opera but doesn't work in chrome!

Export to excel works in ie, firefox, opera but doesn't work in chrome!

delacuestajsdelacuestajs Posts: 7Questions: 0Answers: 0
edited February 2013 in TableTools
Hi Allan and everybody!

I have an esoteric problem: export to excel function works in all browser but doesn't work in chrome. I'm trying to get the manipulated data array to export with a php excel function but I cannot get this modified data array (only selected rows, with the choosen cols order and without the hidden cols).

I mean an api function to get the data array exactly as they appear currently in table, because there is an api function to get an array with all data or selected rows, but there is no one to get the data array exactly as they appear currently in table.

Thank you very much for your help.

Replies

  • delacuestajsdelacuestajs Posts: 7Questions: 0Answers: 0
    Obviously the easy way is fix problem with the export to excel feature in chrome.
  • allanallan Posts: 61,928Questions: 1Answers: 10,153 Site admin
    edited February 2013
    Please don't cross post. It just takes my time up from answering questions. http://datatables.net/forums/discussion/14272 . I've deleted the duplicates.

    Please link to tests cases as well: http://datatables.net/forums/discussion/12899

    My answer from the other thread in reply to

    > I mean an api function to the the data array exactly as they appear currently in table.

    Use the _ API method: http://datatables.net/docs/DataTables/1.9.4/DataTable.html#_
  • delacuestajsdelacuestajs Posts: 7Questions: 0Answers: 0
    Hi Again Allan!

    Sorry about the duplicate.

    I think you are not understanding me. I have a table with table tools, col reorder, etc. Some user that customize the cols order, that did hide some cols and that select some rows, wants to export only this customized data to an excel file. Easy way is using table tools plugin but remember that this feature works for me in ie, firefox, opera but doesn't work in chrome.

    I know that I can use fnGetData to get the data array of the table, but I can't get the customized array, with current order, with some cols hidden and with only selected rows and that is what I need to export to an excel file. If I use fnGetData, I will get an array with all data, or maybe with some selected rows, but I lost the customizations from the user

    Thank you very much for your help again!
  • delacuestajsdelacuestajs Posts: 7Questions: 0Answers: 0
    Maybe there is function with a few parameters to get the current array of data with all the customizations, or some way to fix the export to excel feature in chrome.

    Thank you again
  • allanallan Posts: 61,928Questions: 1Answers: 10,153 Site admin
    > this feature works for me in ie, firefox, opera but doesn't work in chrome.

    Please link to a test case so we can fix that.

    > If I use fnGetData, I will get an array with all data, or maybe with some selected rows, but I lost the customizations from the user

    That's why I suggested using the underscore function, not fnGetData .

    Allan
  • delacuestajsdelacuestajs Posts: 7Questions: 0Answers: 0
    you can visit the website at http://yodigoaquiestoy.redsalvavidas.co/bogesyseg/ user: admin pass: qwerty, choose "ciudad" in "seleccione un criterio", leave "valor" empty and choose a date range like 2013-01-01 and 2013-01-31, press "consultar" and you will see the results in a table. export to excel button is located up right side.

    About the underscore function, what parameters should I use to get the current custom data array?

    Thank you very much for your help.
  • delacuestajsdelacuestajs Posts: 7Questions: 0Answers: 0
    I mean the current custom data array with the cols order, without the hidden cols and only the selected rows.
  • allanallan Posts: 61,928Questions: 1Answers: 10,153 Site admin
    Thanks for the link. I honestly can't explain that. Everything looks like it should be working. The Flash file is there, it just isn't firing off the save for some reason. I'd need to put a trace version of the flash swf to see why that is. It doesn't make any sense...

    Because you are using objects for the data source, you can't actually just get the data from the table with `_` sadly. Otherwise `t._('tr.DTTT_selected')` is all that is needed.

    I'm afraid I don't have an immediate answer atm - I'll need to dig deeper.

    Allan
  • delacuestajsdelacuestajs Posts: 7Questions: 0Answers: 0
    Thank you very much for your support!

    If you need to make any test, I will give you ftp access, so you can upload your trace version of swf.

    Tell me how can I send you the access info by private way.
This discussion has been closed.