给大家介绍一款控件,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