/// <summary> /// 按模板方式导出无返回值 /// </summary> /// <param name="TempName"></param> /// <param name="Value"></param> /// <param name="sp"></param> public void ExportExcel(string TempName, string Value) { var list = Newtonsoft.Json.Linq.JObject.Parse(Value); Dictionary <string, JArray> jarrays = new Dictionary <string, JArray>(); string username = UtilFunction.GetCookie("uname"); foreach (var arry in list) { jarrays.Add(arry.Key, arry.Value as JArray); } SaveParameter sp = new SaveParameter(jarrays, TempName, username); SaveExcel SaveExcel = new SaveExcel(); SaveExcel.RunSave(sp); }
//<summary> //按模板方式导出无返回值 //</summary> //<param name="TempNames">模板名称(N个模板)</param> //<param name="ds">DataSet</param> public void ExportExcel(List <string> TempNames, DataSet ds, Dictionary <string, DataRow> dicAuditRules) { SaveParameter sp = new SaveParameter(TempNames, ds, dicAuditRules); SaveExcel SaveExcel = new SaveExcel(); SaveExcel.RunSave(sp); FileLog.WriteLog("测试(start):SaveExcel.State=" + SaveExcel.State); while (true) { FileLog.WriteLogNotLine("."); if (SaveExcel.State > 1) { return; } } }