public void Execute(Arguments arguments) { try { ExcelManager.RemoveInstance(); } catch (Exception ex) { throw new ApplicationException($"Error occured while closing current excel instance. Message: '{ex.Message}'", ex); } }
public void Execute(Arguments arguments) { try { ExcelManager.SwitchExcel(arguments.Id.Value); } catch (Exception ex) { throw new ApplicationException($"Problem occured while switching to another excel instance. Id: '{arguments.Id.Value}'. Message: '{ex.Message}'"); } }
public void Execute(Arguments arguments) { try { ExcelWrapper excelWrapper = ExcelManager.CreateInstance(); excelWrapper.Open(arguments.Path?.Value, arguments.Sheet?.Value, !arguments.InBackground.Value); Scripter.Variables.SetVariableValue(arguments.Result.Value, new Language.IntegerStructure(excelWrapper.Id)); } catch (Exception ex) { throw new ApplicationException($"Problem occured while opening excel instance. Path: '{arguments.Path.Value}', Sheet: '{arguments.Sheet?.Value}', InBackground: '{arguments.InBackground.Value}'", ex); } }
private void WindowDeactivated(Workbook wb, Window wn) { ExcelManager.RemoveInstance(Id); Close(); }