wlp5402 你好,不好意思,我使用下面代码测试,没有重现你的问题:- SqlConnection connection=new SqlConnection("**************************");
- SqlCommand select = new SqlCommand("select * from country",connection);
- SqlDataAdapter adapter = new SqlDataAdapter(select);
- DataSet dataset = new DataSet();
- adapter.Fill(dataset);
- this.FpSpread1.DataSource = dataset;
- this.FpSpread1.ActiveSheetView.AutoGenerateColumns = false;
- this.FpSpread1.ActiveSheetView.Columns[0].DataField = dataset.Tables[0].Columns[1].ColumnName;
- this.FpSpread1.SaveExcel(@"E:\test.xls");
复制代码 所以,能否发重现问题的 Demo 到论坛上来,便于调试。 |