Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Hi,
 
I have an application and want to move information from a excel file to sql but the problem is that the structure/columns are not identical, Is there a way to specify to which column to go to when reading it?
Posted 7-Oct-12 23:57pm
Comments
skydger at 8-Oct-12 6:04am
   
How does your application load data to SQL server from Excel? There are different ways to load data from Excel or CSV data into SQL server, which one is used in your application?
andilemtshali at 8-Oct-12 6:23am
   
i used a file uploader to get the file and used SqlBulkCopy to copy to server

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hello,
 
Please see the below link. It might be help you. Here you can map the column as well. So may be you can find the solution.
 
http://dotnetslackers.com/articles/sql/Importing-MS-Excel-data-to-SQL-Server-2008.aspx[^]
 
Thanks,
Viprat
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 485
1 mhegazy94 460
2 Kornfeld Eliyahu Peter 315
3 Ravi Bhavnani 200
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 6,890
1 OriginalGriff 6,761
2 CPallini 5,350
3 George Jonsson 3,609
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web01 | 2.8.140922.1 | Last Updated 8 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100