Esempio n. 1
0
        static Program()
        {
            Environment.SetEnvironmentVariable("SkipSheet", SystemConsole.GetommandLineArgs("skipSheet"));
            Environment.SetEnvironmentVariable("TakeSheet", SystemConsole.GetommandLineArgs("takeSheet"));

            Environment.SetEnvironmentVariable("JsonIsIndent", 1.ToString());
            Environment.SetEnvironmentVariable("KeyLine", 1.ToString());
            Environment.SetEnvironmentVariable("SkipRows", 0.ToString());
            Environment.SetEnvironmentVariable("SkipColumns", 0.ToString());
            Environment.SetEnvironmentVariable("TakeColumns", int.MaxValue.ToString());

            foreach (var item in ConfigurationManager.AppSettings.AllKeys)
            {
                Environment.SetEnvironmentVariable(item, config.AppSettings.Settings[item].Value);
            }

            File.WriteAllText("log.txt", ExcelUtils.ExportToJson(Environment.GetEnvironmentVariables()));
        }