Keep workbook open on save as dialog cancellation
This commit is contained in:
parent
14a1225462
commit
b954844de9
@ -46,12 +46,7 @@ namespace RehauSku.Interface
|
|||||||
dialog.FileName = workbook.Name;
|
dialog.FileName = workbook.Name;
|
||||||
dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm";
|
dialog.Filter = "Файлы Excel (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm";
|
||||||
|
|
||||||
if (dialog.ShowDialog() == DialogResult.Cancel)
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
|
||||||
workbook.Close(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
string fileName = dialog.FileName;
|
string fileName = dialog.FileName;
|
||||||
workbook.SaveAs(fileName);
|
workbook.SaveAs(fileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user