200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > C# 读写excel 用于导入数据库 批量导入导出excel

C# 读写excel 用于导入数据库 批量导入导出excel

时间:2022-04-18 16:40:27

相关推荐

C# 读写excel 用于导入数据库 批量导入导出excel

给大家介绍一款控件,Aspose.Cells.dll,相当强大,几乎就是excel,支持excel,excel等格式文件。excel以上,没有经过测试,估计也是可以。

Aspose.Cells.LoadOptions opt = null;if (ext == "XLS"){opt = new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Excel97To);}else if (ext == "XLSX"){opt = new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Xlsx);}else{opt = new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Excel97To);}ImportExcelName = uploadFolder + ImportExcelName;Aspose.Cells.Workbook wb = null;//读取EXCEL文件try{wb = new Aspose.Cells.Workbook(ImportExcelName, opt);}catch{resultDict.Add("IsSuccess", false);resultDict.Add("_msg", "不是标准的Excel,请确认!");return resultDict;}

偕行软件欢迎您光临我们的博客

我们致力于打造国内第一个支持直接在线演示的人力资源管理系统!

我们的官网:

我们的空白开发框架:http://60.211.233.210:8088

我们的集团式人力资源管理系统:http://60.211.233.210:8081

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。