Use META tag to specify the charset on a HTML table, all cells are treated as text in Excel 2003

X

xuwei.wang

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top