如图所示:部分代码如下:
for (int j = start; j < end; j++)
            {
                Response.Write("\r\n<Row>");
                //int asdf = GridView1.HeaderRow.Cells.Count;
                for (int c = 0; c < GridView1.HeaderRow.Cells.Count-4; c++)
                {
                    //对于数字,采用Number数字类型
                    if (c >= 0)
                    {
                        Response.Write("<Cell ss:StyleID='border'><Data ss:Type='String'>" + GridView1.Rows[j].Cells[c].Text + "</Data></Cell>");
                    }
                    else
                    {
                        Response.Write("<Cell ss:StyleID='border'><Data ss:Type='Number'>" + GridView1.Rows[j].Cells[c].Text + "</Data></Cell>");
                    }
                }
                Response.Write("\r\n</Row>");
            }

解决方案 »

  1.   

    你在EXECL中单击绿点看看,有提示或变化的
      

  2.   


    提示以文本格式的形式存储数字
    GridView1.Rows[j].Cells[c].Text 
    改为
    Convert.ToInt32(GridView1.Rows[j].Cells[c].Text )
    试试
      

  3.   

    哎呀好像有08.24啊
    不行的话用Convert.ToDouble()试试吧
      

  4.   

    ……
    楼主对Excel不甚了解。
    这是因为单元格的格式字符串。
    你输入一个数字在前面加个单引号试试,是一样的,如果你的程序中转换为数值型的话有些数据前面的0可能会丢失,当然超过一定长度也会显示科学计数法。
      

  5.   

    这个跟孟子一点关系都没有...不过是Office的智能提示功能而已,表示这些数据可以做一些相关的自动化处理...