在执行导出操作时,Sheet中包含ComboBoxCellType类型的单元格, 数据绑定如下:
DataTable dt = this._equipmentinboundbl.GetCcqmc(this._application.UseUnitCode);
string[] ccqmcarray = DataSetToArray(dt, "ccqmc");
string[] ccqbharray = DataSetToArray(dt, "ccqbh");
ComboBoxCellType cbobox = new ComboBoxCellType();
cbobox.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter;
cbobox.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData;
cbobox.EditorValueChanged += new EventHandler(cbobox_EditorValueChanged);
cbobox.Items = ccqmcarray;
cbobox.ItemData = ccqbharray;
this.fpSpread1.Sheets[0].Cells[3, 2].CellType = cbobox;
在执行导出时, 使用isSuccessExport = fpSpread.SaveExcel(tmpFileName, FarPoint.Excel.ExcelSaveFlags.SaveCustomColumnHeaders | FarPoint.Excel.ExcelSaveFlags.NoFormulas | FarPoint.Excel.ExcelSaveFlags.ComboDataOnly);
语句,但导出的结果中,ComboBoxCellType结果为ccqbharray的值,而我现在需要的是直接在页面看到的值ccqmcarray,请问这个需要怎么处理呢? |
|