c# - import csv file/excel into sql database asp.net -


I started a project using ASP.NET Visual Studio 2008 / SQL 2000 (future in 2005) using C # Am

The difficult part for me is that the existing DB schema often changes and the import file column will be matched with the existing DB schema because they can not match one by one in the name of the column. (There is a lookup table that will provide table schema with table names that I will use)

I'm exploring different ways to do this, and some expert advice is needed Have control or frameworks that I can take advantage of to do any of this work?

So far, I have FileUpload Net Control, as well as some 3rd party upload control detected but files should be uploaded to complete the upload & lt; 500 MB

In the next section, reading my CSV / Excel and parsing it to display the user so that they can match it with our DB schema. I looked and others, but to make it even more difficult, because I would need to support different versions.

The user who originally imported this will insert and / or update several tables from this import file. There are other more advance requirements such as record matches but preview of import records, but I want to get it through understanding to do the first

UPDATE:. I ended up using csvReader with LumenWorks.Framework to upload CSV files

Excellent filehelders library See - it's about one and it's hosted.

This is pure C #, and it can import about any flat file, CSV, and it also works with Excel. Import is completely configurable - You can define things like limiting, leaving lines and / or columns, and so on -. Too many choices

I have successfully used it in various projects and it just works without losses - highly recommended.


Comments