Microsoft
Software
Hardware
Network
Question : Import Excel Into Sql Server
I am wanting to write a process to import an excel spreadsheet into Sql Server. The problem is, the excel spreadsheet will contain different number of column in different orders. What I was envisioning was:
1. Upload an Excel spreadsheet
2. Display the data in a listview or gridview
3. Having dropdowns in the column headers that contain the fields in my database table.
4. User then maps the columns in the gridview to the appropriate column from the dropdown.
5. Generate a Sql Insert Statement to insert the data from the grid or listview.
Is this even possible, or should I go down another path? Keep in mind the Excel spreadsheet will be in different formats every time.
The purpose of this question is to see if it is possible, or take any suggestions on better ways to accomplish this. If it is I will probably start a series of questions on places where I get hungup.
Thanks
Answer : Import Excel Into Sql Server
select concat(year(YourDate), '-',Month(YourDate)) from table
Random Solutions
IBM System x3400 8K-I RAID Controller query
Infopath Form service comparison between SharePoint 2007 and SharePoint 2010
Script to Remove Groups from the "Member of" groups in a list of user accounts
Word 2002/xp: Error Message: "Run-time error '4248'; 'This command is not available because no document is open.'"
make opera mini 5 my default browser
jQuery hotkeys used in an iframe.
Error string in catch block?
Need Manual (PDF) for Canon ImageRunner C4080
exchange 2003 and ISA 2006 certificate renew - RPC-HTTPS not working
Having problems getting my VOIP setup working?