asp 导入excel出现的 问题
for(intj=0;j<i;j++){intk=Convert.ToInt16(GridView1.Rows[j].Cells[1].Text);if(k==1)gri...
for (int j = 0; j <i; j++)
{
int k=Convert.ToInt16(GridView1.Rows[j].Cells[1].Text);
if (k==1)
gridview中的数据是自己从excel中导入的,在int k=Convert.ToInt16(GridView1.Rows[j].Cells[1].Text);
出错
Input string was not in a correct format.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.FormatException: Input string was not in a correct format.
求指点!!! 展开
{
int k=Convert.ToInt16(GridView1.Rows[j].Cells[1].Text);
if (k==1)
gridview中的数据是自己从excel中导入的,在int k=Convert.ToInt16(GridView1.Rows[j].Cells[1].Text);
出错
Input string was not in a correct format.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.FormatException: Input string was not in a correct format.
求指点!!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询