aboutsummaryrefslogtreecommitdiff
path: root/src/Interface
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-03-30 12:26:18 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-03-30 12:26:18 +0300
commit1e91c34e465dd8a7f4f44307c874883b3569053d (patch)
tree9624805ec5c69f16295008e56c79cec63a34c97b /src/Interface
parent443364e66c5b010197dd4d62a65af716d09fdab9 (diff)
Revert "Turn off save as file dialog at the end of tool process. Version update."
This reverts commit eaf3ebaa9489462e3d663c93df7a9bc34011464c.
Diffstat (limited to 'src/Interface')
-rw-r--r--src/Interface/Dialog.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Interface/Dialog.cs b/src/Interface/Dialog.cs
index 95d676f..e6c7955 100644
--- a/src/Interface/Dialog.cs
+++ b/src/Interface/Dialog.cs
@@ -36,5 +36,22 @@ namespace RehauSku.Interface
else return null;
}
}
+
+ public static void SaveWorkbookAs()
+ {
+ Workbook workbook = AddIn.Excel.ActiveWorkbook;
+
+ using (SaveFileDialog dialog = new SaveFileDialog())
+ {
+ dialog.FileName = workbook.Name;
+ dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm";
+
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ string fileName = dialog.FileName;
+ workbook.SaveAs(fileName);
+ }
+ }
+ }
}
}