摘要: HTML及JS : 1 @{ 2 ViewData["Title"] = "Home Page"; 3 Layout = "~/Views/Shared/_Layout.cshtml"; 4 } 5 6 @section Styles{ 7 <link href="/lib/bootstrap/di 阅读全文
posted @ 2022-05-04 15:09 WikiChen 阅读(444) 评论(0) 推荐(0) 编辑
摘要: JS库:xlsx.full.min.js , axios.min.js HTML : 1 <input type="file" id="fileUpload" class="form-control" data-show-preview="false"> JS : 1 var s_objson = 阅读全文
posted @ 2022-05-04 11:24 WikiChen 阅读(390) 评论(0) 推荐(0) 编辑
摘要: Controller : 1 [HttpGet] 2 public IActionResult ExportExcel() 3 { 4 try 5 { 6 7 StringBuilder htmlcontent = new StringBuilder(); 8 9 htmlcontent.Appen 阅读全文
posted @ 2022-05-04 09:42 WikiChen 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1 string str = "1,\r\n2,\r\n3,\r\n"; 2 string.Join(",", str.Split(new string[] { ",", "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries).Select(s 阅读全文
posted @ 2022-05-04 08:34 WikiChen 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1 string s = "1,\r\n2,\r\n3,\r\n"; 2 s.Replace(",", "").Replace("\r", "").Split('\n').ToList(); //结果 : [1,2,3,""] 3 s.Split(new string[] { ",", "\n", 阅读全文
posted @ 2022-05-04 08:21 WikiChen 阅读(122) 评论(0) 推荐(0) 编辑