我想将 html 表导出到 excel。我可以导出的所有数据。但我对复选框有疑问。我无法在 Excel 中显示我的复选框。也有一些选中的复选框。可以在excel中显示复选框吗?
我的代码;
function CreateExcelSheet(div,table){
if (is_gecko) {
var div =document.getElementById(div).innerHTML;
windowUrl = "data:application/vnd.ms-excel,";
var printWindow = window.open(windowUrl + encodeURIComponent(div), table);
}
else if (is_ie5up){
var x = document.getElementById(table).rows;
var xls = new ActiveXObject("Excel.Application");
xls.visible = true
xls.Workbooks.Add
for (i = 0; i < x.length; i++) {
var y = x[i].cells;
for (j = 0; j < y.length; j++) {
xls.cells(i + 1, j + 1).value = y[j].innerText;
}
}
}
else{
alert("No support Excel please open whit Firefox!");
}
}
感谢您的帮助