Custom Excel button - error when opening
Custom Excel button - error when opening
Josip
Posts: 7Questions: 1Answers: 0
Hello guys,
I'm working with custom excel export. Everything works fine till I add 27th column. Then Excel shows me an error. What I'am doing wrong here? I would really appreciate someones help me. Here's my code:
Replies
I was able to open the exported file with no problems. Does the test case show the issue you are having?
Kevin
There are 26 columns now. Please try to add one more and check results please.
Since you know what will cause the error please update the test case to show the problem so we can help debug.
Kevin
Ok, here is example with error
http://live.datatables.net/femerimi/15/edit
It opens fine in LibreOffice for me, although it shows lots of Undefined values.
Does it generate the Excel file okay for you when you comment out the
customize
callback? Without having read and understood all the custom code you have in it (sorry - I'm rushing a bit atm!) my guess is that the error is in how the columns are referenced. You need to useAA
for column 27,AB
for 28 and so on.Allan
Looks like the problem is int he buildRow function. It is generating the column letters, ie, A-Z. The 27th column should be AA but if you debug the code it results in
10
as the column number. The problem is with this statement:More code will need to be added to accommodate columns AA and beyond. I added a console.log statement so you can see this:
http://live.datatables.net/gayuzile/1/edit
Kevin
This is the function we use in Buttons to generate the column label.
Allan