ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use META tag to specify the charset on a HTML table, all cells are treated as text in Excel 2003 (https://www.excelbanter.com/excel-programming/362948-use-meta-tag-specify-charset-html-table-all-cells-treated-text-excel-2003-a.html)

[email protected]

Use META tag to specify the charset on a HTML table, all cells are treated as text in Excel 2003
 
I am using Response.ContentType = "application/vnd.ms-excel" to export
a html table (actually it's a grid with headers and data) to excel. To
get the double byte header text (such as Chinese or Japanese) show up
correctly, I have to specify the charset in the html documentation by
using the META tag. <HEAD<META http-equiv="Content-Type"
content="text/html;charset=GB2312" /</HEAD

By doing that, all the cells in the html table are treated as text in
Excel 2003. As a result, the number format and the formula on the data
cells are messed up. Does anyone has seen this? Please share your
insight if you have a solution. Thanks in advance!



All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com