- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- string path = Server.MapPath("~");
- //this.FpSpread1.Open(path + "\\111.xml");
- //this.FpSpread1.EditModeReplace = true;
- }
- protected void FpSpread1_UpdateCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- }
- protected void FpSpread1_ButtonCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e)
- {
- getValue();
- }
- public void getValue()
- {
- object value;
- //DataTable dt = new DataTable();
- //getdata(2);
- //dt = ds.Tables[0];
- int i, j;
- for (i = 0; i < FpSpread1.Sheets[0].RowCount; i++)
- {
- for (j = 0; j < FpSpread1.Sheets[0].ColumnCount; j++)
- {
- if (FpSpread1.Sheets[0].Cells[i, j].Tag != null)
- {
- //foreach (DataColumn dc in dt.Columns)
- //{
- // if (dc.ColumnName == Convert.ToString(FpSpread1.Sheets[0].Cells[i, j].Tag))
- // {
- // dt.Rows[0][dc] = FpSpread1.Sheets[0].Cells[i, j].Value;
- // break;
- // }
- //}
- //value = FpSpread1.Sheets[0].Cells[i, j].Value;
- //if (value != null)
- //{
- // Response.Write("<script>alert('" + value.ToString() + "')</script>");
- //}
- if (FpSpread1.Sheets[0].Cells[i, j].Value != null)
- {
- value = FpSpread1.Sheets[0].Cells[i, j].Value;
- if (value != null)
- {
- Response.Write("<script>alert('" + value.ToString() + "')</script>");
- }
- }
- }
- }
- }
- }
- }
复制代码
您帮我看看吧,里面没加任何设置呢 在IE中不可以编辑,也不走断点,在谷歌中就可以呢。。 谢啦 |