开发ASP.NET应用程序

开发ASP.NET应用程序

问题描述:

我的任务是开发一个.net应用程序,该应用程序可以使用.xls或.xlsx类型的excel表并将其插入数据库.但是,Excel工作表的格式是一致的,因此我需要一种将数据从Excel工作表映射到其工作表的方法 在数据库中的正确位置.我想我将使用EP Plus导入读取的Excel工作表.我从哪里开始这个项目?任何建议都会有所帮助.

I am tasked with developing a .net application that can take an excel sheet of either .xls or .xlsx type and insert it to a database. However, the format of the excel sheets are consistent, so I need a way to map the data from the excel sheet into its correct location in the database. I think I'll use EP Plus to import the read the excel sheet. Where do I even begin with this project? Any advice would be helpful.

Hello scriptkitty123,

Hello scriptkitty123,

基于以前的项目,我参与其中并非易事,并且可能令人沮丧.  第三方应用程序可以简化此操作:

Based on previous projects I have been involved with this is not trivial and can be frustrating.  There are third party applications that can simplify this: ExcelLibrary.  You might want to try using the Microsoft libraries directly, for example: https://coderwall.com/p/app3ya/read-excel-file-in-c

如果可以先将文件转换为xml,则可以简化此过程.  以我的经验,使用xml比使用本机文件类型可靠得多.

If you could get the files converted to xml first then that might simplify the process.  In my experience, working with xml was far more reliable than working with the native file types.