js导不出xls格式
各位高手。帮帮忙吧。为什么能导出 html txt 却导不出 xls 格式的<script type="text/javascript">
function excelPrint() {
var tempStr = document.getElementById('tableExcel').outerHTML;
var strOut =getStyle()+ strContent;
var winSave = window.open();
winSave.document.open("", "");
winSave.document.write(strOut);
winSave.document.close();
winSave.document.execCommand("SaveAs", true, "aa.xls");
winSave.window.close();
}
function getStyle() {
var Style = '<style>TB{BACKGROUND-COLOR: black;FONT-SIZE: 12px;LINE-HEIGHT: 16px;TEXT-DECORATION: none;} td{mso-number-format:"\@";BACKGROUND-COLOR:white} td.top{BACKGROUND-COLOR: #4F93DC;COLOR: #ffffff;FONT-SIZE: 12px; LINE-HEIGHT: 16px; TEXT-DECORATION: none;}</style>';
return Style;
}
</script> --------------------编程问答-------------------- 因为所有浏览器都不支持
补充:.NET技术 , C#