Web导出Word需要添加头文件
经常导出EXCEL,上次需要导出到WORD,用原来EXCEL的方法不管用了,出现编码错误,郁闷,打开WORD文件,另存为HTML,看了一下源码,发现一段头文件,添加之后,正确导出了.
tableHeader = " <html xmlns:o=\"urn:schemas-microsoft-com:office:office\"";
tableHeader +="xmlns:w=\"urn:schemas-microsoft-com:office:word\"";
tableHeader += "xmlns:st1=\"urn:schemas-microsoft-com:office:smarttags\"";
tableHeader += "xmlns=\"http://www.w3.org/TR/REC-html40\">";
tableHeader +="xmlns:w=\"urn:schemas-microsoft-com:office:word\"";
tableHeader += "xmlns:st1=\"urn:schemas-microsoft-com:office:smarttags\"";
tableHeader += "xmlns=\"http://www.w3.org/TR/REC-html40\">";