How to import excel files in asp.net to any database? -
I have a set of Excel templates that will be entered by the user, to me the data entered in this template in the database Have to import. The problem with the templates is that they are not in table format.
With your question, I assemble you 'To access spreadsheet data, OLEDB has refused to use, which only works with tabular data. Therefore, you have any need to reach individual cells, etc.
You can open excel files (via interop) because I'm sure someone will give suggestions but, if you can avoid doing so, then You need - it has all kinds of problems (this is uneven, and you will not get any help from Microsoft because they do not do it originally).
If you can save excel files as XML, then you can avoid doing so.
-
If you are using Excel 2003, you can save as "XML spreadsheet", which is functionally equivalent to a normal XLS file, except that It can not contain charts or macro codes In addition, it looks like a user - and processing it in the code is very easy.
-
If you are using Excel 2007 then the original file format is already XML (although stored in a zip file), and then you can process that code You can. There are many examples on the on-line.
Comments
Post a Comment