private static void RunExporterAll() { List <ExportType> typeList = DataMemory.GetOptionsFromTypes(); foreach (ExportType type in typeList) { ExporterAll all = new ExporterAll(); all.OptionList = DataMemory.GetExportOptions(type); all.Coding = Coding; all.ExpType = type; all.OutPath = GetExporterPath(type); all.Init(); all.Process(); all.Clear(); } }
/// <summary> /// 根据窗口参数,执行Excel数据导出工作 /// </summary> /// <param name="options">命令行参数</param> public static void RunXlsxForm(ExprotCallbackArgv argv) { if (argv == null) { throw new Exception("Run xlsx form argv is null."); } if (argv.OnRunChanged != null) { argv.OnRunChanged("=================开始导出================="); } int curreExportCount = 0; List <ExportType> typeList = DataMemory.GetOptionsFromTypes(); foreach (ExportType type in typeList) { List <Options> optionList = DataMemory.GetExportOptions(type); foreach (Options option in optionList) { Options result = CmdXlsx(type, option); if (argv.OnRunChanged != null) { argv.OnRunChanged(Options.ConvertToString(type, result)); } curreExportCount++; if (argv.OnProgressChanged != null) { argv.OnProgressChanged(curreExportCount); } Thread.Sleep(1); } } RunExporterAll(); if (argv.OnRunChanged != null) { argv.OnRunChanged("=================导出完毕================="); } }