Комментарии:
in my previous comment is said to move the style section out of the ttable section. I meant, move it our of the thead section.
ОтветитьHello, CodeX-World, I found a solution to exporting to excel from my previous problem. I was only getting one blank line of data on the table knowing that my table included n rows and n columns. What I did, was to move the STYLE section of the table to be exported ( because I have 2 tables) OUT of the "ttable" section and move it ABOVE the table (does not need to be inside the script tags). After that, I saved, refreshed my table and though I still got the same message alert from Excel before dumping I said yes to open the page. When it opened, the data was there with headers and data and all - complete. Thanks, for your algorithm. It's not as complex as other presentations. (July 29, 2023)
ОтветитьI went to your website and downloaded the code and tried to follow as much as possible. When I clicked the button, it opened the save as dialogue box and then when i tried to open it in Excel, it returned a message: 'The file you are trying to open ' MyHTMLtable-ToExcel.xls' is in a different format other than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to continue?" I pressed yes and it opened the file in Excel (MS Excel 2007) with a blank entry at cells A1. I checked the excel file length and it was only 1k. I had 36 rows and 9 columns of data in the table.
I put an alert to view the downloadLink variable and it returns blank: alert("downloadLink: " + downloadLink);
Apparently your code created an 'anchor' ("a") element. My alert should have returned an object reference but it was blank. I tested the createElement by substituting "input" instead of "a" and it returned an object reference. I had a return; statement following the alert to stop the debugging.
What line number should I recheck in your code? Thanks for the feedback. July 28, 2023, Friday. Phoenix, AZ 112° F.
Thanks Bro I got a appropriate result. 👍
Ответитьcopy....
paste...
GOT IT! :D Thanks!
its downloads the file.. but as i open it says "the file format and extension don't match" When I cklick OK no data there is no data in the excel file
Ответитьhow can I download file with .xlsx extension and open in excel.
ОтветитьThanks a ton! I got the result i was looking for!
ОтветитьHow about adding ignoreColumn?
I would like to export excluding certain columns
thanks man, I wanna create invoice view with this technique. is it possible?
ОтветитьThank bro , how can i show border in html like in excel ?
ОтветитьAfter a whole of research, this is what works for me
Thanks bro
Thank bro , how can i show border in html like in excel ?
ОтветитьThanks! How do I change the format to xlsx?
ОтветитьThank bro.
After exporting , in excel file not showing Gridlines, How to solve?
How can I use UTF-8?
Ответить