0

I have an excel report like this:

      A          B         C          D         E    
1  -------   -------    07/01/14   07/02/14  07/03/14  
2  Location:   Alief  
3  Owner:      01354  
4  Sales:                1,244       2,323      988  
5  Supply:                800         500       200  
6  
7  Location:   Cypress  
8  Owner:      01358  
9  Sales:                5,231       5,323      4,988  
10 Supply:                4000        2800      1500  
11  

The dates change each week the report its uploaded and there are 50+ locations, owner, ie sets of data in each report(so 1 excel report has 250+ rows).

I need to import this excel file into SQL server 2008 R2 using C#. After uploading the file, I need to parse each section out and then unpivot each section so they can be stored properly. All the examples I've seen online show a simple excel file with row 1 as headers and the remaining rows as data. Any help in the direction I need to look would be greatly appreciated.

2
  • Here's all the code you need to do what you're talking about. Just edit the connection string and the table information. codeproject.com/Tips/636719/…
    – Waffles
    Commented Jul 17, 2014 at 9:58
  • Thanks for some direction, I've decided to grab the data into to tables before I sqlbulkcopy upload them.
    – MADnoobie
    Commented Jul 28, 2014 at 14:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.