wenchaojian 你好
我的意思是,你希望自己来制定列的单元格类型,是这样吗,可以设置DataAutoCellTypes 为false,代码如下:- FarPoint.Web.Spread.SheetView sv;
- sv = FpSpread1.ActiveSheetView;
- string conStr = "Provider=Microsoft.JET.OLEDB.4.0;data source= d:\\Patients2000.mdb";
- string sqlStr = "SELECT * FROM Patients";
- System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(conStr);
- DataSet ds = new DataSet();
- System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter(sqlStr, conn);
- sv.DataAutoCellTypes = true;
- sv.DataMember = "Patients";
- da.Fill(ds);
- sv.DataSource = ds;
复制代码 |