Coder Social home page Coder Social logo

Comments (19)

chankeypathak avatar chankeypathak commented on July 20, 2024

Sorry, closed by mistake :)

from tabletools.

 avatar commented on July 20, 2024

The Excel export is really a CSV file. Actually writing an XLSX file, which would be required to keep the formatting, would be a very significant amount of work.

I do hope to do it sometime, but I'm not planning on adding this any time soon, as there are many other features demanding my attention at the moment.

from tabletools.

chankeypathak avatar chankeypathak commented on July 20, 2024

OK, keep the issue open then.

And thanks for creating DataTables, it's a great tool! :)

from tabletools.

balalinux avatar balalinux commented on July 20, 2024

http://jsfiddle.net/chankeypathak/7cwZ9/1/show/ doesnt seems to work.

TypeError: table is null
var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}
Could you please fix this ?

Thanks.

from tabletools.

 avatar commented on July 20, 2024

@balalinux - Your demo doesn't use any code developed by myself. Therefore this is not the appropriate place to ask for help. Either ask on StackOverflow or I'm sure there are plenty of freelancers who would help.

from tabletools.

balalinux avatar balalinux commented on July 20, 2024

@DataTables Sorry Allan. I was referring to @chankeypathak since its his demo. Anyway, I will handle it in private.

Thanks.

from tabletools.

chankeypathak avatar chankeypathak commented on July 20, 2024

@balalinux : Sorry, refer this link: http://jsfiddle.net/7cwZ9/16/show/

from tabletools.

balalinux avatar balalinux commented on July 20, 2024

Thanks @chankeypathak. I just wanted to see your approach.

from tabletools.

jklaus avatar jklaus commented on July 20, 2024

I have actually written a library that implements xlsx.js (for FF & Chrome) and ActiveX (calling Excel.Application, for IE) to support well formatted XLSX export from json. I believe both of these approaches support support cell level styling.. I will actually be digging into that within the next couple days. I was going to make it accessible via an extension/prototype.. but if you want I could add it into the primary table tools.

from tabletools.

p0tvin29 avatar p0tvin29 commented on July 20, 2024

@jklaus are you able to provide your library?

from tabletools.

jklaus avatar jklaus commented on July 20, 2024

@p0tvin29 yes, take a look at jk

I haven't gotten back around to adding cell level styling though. Given we can probably just drop IE8 (ActiveX) support it should be fairly painless if memory serves. I also have an extension to DataTables that I wrote which provides an "Excel" button to TableTools. It can be overridden to create complex exports or simply implemented and the exporter reflects on the current column options to hook everything up... if you don't get a message back from me in regard to this piece tomorrow feel free to bump this thread.

from tabletools.

jklaus avatar jklaus commented on July 20, 2024

I went ahead and added a crude version of the file.. see TableTools.Extensions.js

from tabletools.

 avatar commented on July 20, 2024

I should point out that TableTools has be retired in favour of Buttons. It will export true xlsx files so you might find it easier to add formatting there.

from tabletools.

jklaus avatar jklaus commented on July 20, 2024

Assuming folks aren't stuck in legacy correct?

from tabletools.

 avatar commented on July 20, 2024

Yes. I'm no longer actively developing TableTools - but its open source so it can continue if needed!

from tabletools.

jklaus avatar jklaus commented on July 20, 2024

At the time I was stuck in legacy - had to support IE8, IE11, Chrome, FF, Opera, etc. Now we're finally off IE8.

from tabletools.

xezpeleta avatar xezpeleta commented on July 20, 2024

I need something similar. I would like to export my table to Excel, keeping the links.

For instance, I have a table with the following column:

<td><a href="about:blank">This is a link</a></td>

When I export my table to Excel, I only can see "This is a link" but it's not linked.

Do you know if is it possible to do that?

Thanks in advance

from tabletools.

BeingWasiZaidi avatar BeingWasiZaidi commented on July 20, 2024

export to xlsx with column background color ?

from tabletools.

Shaheerarain786 avatar Shaheerarain786 commented on July 20, 2024

@BeingWasiZaidi
"buttons": ['pageLength', { extend: 'excel', text: 'Export excel', footer:true, customize: function( xlsx ) { var sheet = xlsx.xl.worksheets['sheet1.xml']; $('row c[r^="G"]', sheet).each( function () { if ( $(this).text()>= 1) { $(this).attr( 's', '56' ); } }); }, exportOptions: { columns: ':visible', } } ],
This is how you can change the background color of your cell while exporting the excel file.
Regards.

from tabletools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.