コード例 #1
0
        public string CreateExcelWithRJson(string jsonStr)
        {
            RM4ExcelData excelData  = DataContractHelper.FromJsonTo <RM4ExcelData>(jsonStr);
            DataTable    exceltable = CreateMyExcel(excelData);

            strHeaderText = excelData.Title;

            string paths = HttpContext.Current.Server.MapPath("~");

            strFileName   = paths + "\\upload\\excel";
            strHeaderText = GetFieldName(strHeaderText);
            string filename = GetFileName(strHeaderText);

            strFileName = strFileName + "\\" + filename;

            StartCreateExcel(exceltable, strHeaderText, strFileName);
            return(filename);
        }