Beispiel #1
0
        private void buttonDoImport_Click(object sender, EventArgs e)
        {
            LoggingForm logger = new LoggingForm();
            logger.Show(this);

            string excelFilePath = textBoxExcelFilePath.Text;
            string codeFolderPath = GetMacroFolderPath(false);

            MacroEnv env = new MacroEnv(codeFolderPath);

            ExcelOperator access = new ExcelOperator();
            if (checkBoxRemoveAllMacrosBeforeImport.Checked)
                access.AddCommand(new RemoveMacros(logger));
            access.AddCommand(new ImportMacros(logger, env, cbOverrideImport.Checked));
            access.invoke(excelFilePath, true);
        }
Beispiel #2
0
        private void bRemoveAllMacros_Click(object sender, EventArgs e)
        {
            LoggingForm logger = new LoggingForm();
            logger.Show(this);

            string excelFilePath = textBoxExcelFilePath.Text;

            ExcelOperator access = new ExcelOperator();
            access.AddCommand(new RemoveMacros(logger));
            access.invoke(excelFilePath, true);
        }