fengling2001 你好
不知你现在使用的是Spread for WinForms还是ASP.NET,在Spread for winForms中可以使用以下方法来实现,Spread for ASP.NET暂时还无法实现该功能:
- FarPoint.Win.Spread.Data.SpreadDataBindingAdapter data = new FarPoint.Win.Spread.Data.SpreadDataBindingAdapter();
- // Assign the datasource to a data table
- data.DataSource = dt;
- data.Spread = fpSpread1;
- data.SheetName = "Sheet1";
- data.MapperInfo = new FarPoint.Win.Spread.Data.MapperInfo(3, 2, 1, 1);
- data.FillSpreadDataByDataSource();
复制代码 |