private void toolStripButton1_Click(object sender, EventArgs e) { ReoGridControl _reoGridControl = _editor.Grid; if (_reoGridControl.Save(SavePath + _fileName)) { if (Saved != null) { EventData ed = new EventData() { String = SavePath + _fileName }; Saved(ed, new EventArgs()); } //send command to e3d/pdms } }
public void SaveFile() { if (EdLib.HasFile(path_CurrentPackage, true)) { if (IsCurrentPackageSteamWorkshop) { EdLib.AskMsg(loadOnlinePackageWarning); } else { ReoMain.Save(GetPath(path_CurrentPackage) + "\\Database\\database.xlsx", unvell.ReoGrid.IO.FileFormat.Excel2007); foreach (var item in ReoMain.Worksheets) { item.ExportAsCSV(GetPath(path_CurrentPackage) + "\\Database\\" + item.Name + ".csv"); } } } }
public static void ExporAsExcel(ReoGridControl workbook) { if (workbook != null) { OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.Multiselect = true; fileDialog.Title = "请选择文件"; fileDialog.Filter = "|*.xlsx"; if (fileDialog.ShowDialog() == DialogResult.OK) { var file = fileDialog.FileName; workbook.Save(file, unvell.ReoGrid.IO.FileFormat.Excel2007); MessageBox.Show("已选择文件:" + file, "选择文件提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { MessageBox.Show("无导出内容", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } }