-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep color and formatting information in Excel #44
Comments
Sorry, closed by mistake :) |
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. |
OK, keep the issue open then. And thanks for creating DataTables, it's a great tool! :) |
http://jsfiddle.net/chankeypathak/7cwZ9/1/show/ doesnt seems to work. TypeError: table is null Thanks. |
@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. |
@DataTables Sorry Allan. I was referring to @chankeypathak since its his demo. Anyway, I will handle it in private. Thanks. |
@balalinux : Sorry, refer this link: http://jsfiddle.net/7cwZ9/16/show/ |
Thanks @chankeypathak. I just wanted to see your approach. |
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. |
@jklaus are you able to provide your library? |
@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. |
I went ahead and added a crude version of the file.. see TableTools.Extensions.js |
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. |
Assuming folks aren't stuck in legacy correct? |
Yes. I'm no longer actively developing TableTools - but its open source so it can continue if needed! |
At the time I was stuck in legacy - had to support IE8, IE11, Chrome, FF, Opera, etc. Now we're finally off IE8. |
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 |
export to xlsx with column background color ? |
@BeingWasiZaidi |
If you download the Excel file of table it shows all the content correctly. Kindly add the feature of keeping the formatting and colour information of cells so that the table looks exactly the same as it looks on webpage.
I achieved this without using TableTools here: http://jsfiddle.net/chankeypathak/7cwZ9/1/show/
But I really want to use TableTools. Can you please add this feature? Thanks.
The text was updated successfully, but these errors were encountered: