From b9c96ae180ecd6386e35e97d4f5185bca0379965 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Tue, 8 Feb 2022 13:40:23 +0300 Subject: [PATCH] Open target worbook readonly. Turn off Save As dialog. --- src/PriceListTools/AbstractTool.cs | 2 +- src/PriceListTools/CombineTool.cs | 2 +- src/PriceListTools/ConvertTool.cs | 2 +- src/PriceListTools/ExportTool.cs | 2 +- src/PriceListTools/MergeTool.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PriceListTools/AbstractTool.cs b/src/PriceListTools/AbstractTool.cs index b4e34cc..77126ff 100644 --- a/src/PriceListTools/AbstractTool.cs +++ b/src/PriceListTools/AbstractTool.cs @@ -18,7 +18,7 @@ namespace RehauSku.PriceListTools public void OpenNewPrice() { - Workbook wb = ExcelApp.Workbooks.Open(RegistryUtil.PriceListPath); + Workbook wb = ExcelApp.Workbooks.Open(RegistryUtil.PriceListPath, 0, true); try { diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index af9378c..cdb8d20 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -34,7 +34,7 @@ namespace RehauSku.PriceListTools FilterByAmount(); ResultBar.Update(); - Interface.Dialog.SaveWorkbookAs(); + //Interface.Dialog.SaveWorkbookAs(); ExcelApp.StatusBar = false; } } diff --git a/src/PriceListTools/ConvertTool.cs b/src/PriceListTools/ConvertTool.cs index d13c803..0e1250d 100644 --- a/src/PriceListTools/ConvertTool.cs +++ b/src/PriceListTools/ConvertTool.cs @@ -39,7 +39,7 @@ namespace RehauSku.PriceListTools FilterByAmount(); ResultBar.Update(); - Dialog.SaveWorkbookAs(); + //Dialog.SaveWorkbookAs(); ExcelApp.StatusBar = false; } } diff --git a/src/PriceListTools/ExportTool.cs b/src/PriceListTools/ExportTool.cs index f341671..9436d1a 100644 --- a/src/PriceListTools/ExportTool.cs +++ b/src/PriceListTools/ExportTool.cs @@ -30,7 +30,7 @@ namespace RehauSku.PriceListTools FilterByAmount(); ResultBar.Update(); - Interface.Dialog.SaveWorkbookAs(); + //Interface.Dialog.SaveWorkbookAs(); ExcelApp.StatusBar = false; } diff --git a/src/PriceListTools/MergeTool.cs b/src/PriceListTools/MergeTool.cs index 0e3f1dc..a7d6469 100644 --- a/src/PriceListTools/MergeTool.cs +++ b/src/PriceListTools/MergeTool.cs @@ -25,7 +25,7 @@ namespace RehauSku.PriceListTools FilterByAmount(); ResultBar.Update(); - Dialog.SaveWorkbookAs(); + //Dialog.SaveWorkbookAs(); ExcelApp.StatusBar = false; } }