您好
1.我测试了一下2.0是可以的
- // choose file
- OpenFileDialog dlg = new OpenFileDialog();
- dlg.DefaultExt = "xls";
- dlg.FileName = "*.xls";
- if (dlg.ShowDialog() != DialogResult.OK)
- return;
- // clear data source, if any
- _flex.DataSource = null;
- string[] sheets = _flex.LoadExcelSheetNames(dlg.FileName);
-
- // load the first sheet in the book
- FileFlags flags = (_chkFixed.Checked) ? FileFlags.IncludeFixedCells : FileFlags.None;
- _flex.LoadGrid(dlg.FileName, FileFormatEnum.Excel, flags);
复制代码
2.flexgrid 可以设置Visble来隐藏flexgrid,不影响取值。 |