Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


import data from excel only from specific cells


import data from excel only from specific cells

Author
Message
sasken
sasken
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1426 Visits: 1915
Hello Everyone,

Hope all is well.

I was wondering if I can import data from an excel sheet only from specific cells to sql server 2008 r2. I can we can do this through sql import task but I want to know I can select data from specific cells only.

Thanks for your help.

“If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” -- John Quincy Adams
Yev-704641
Yev-704641
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 75
WHen adding Excel Source and under "Show Advanced Editor" and in Component Properties you could specify your own OpenRowset like Sheet1$A3:H3 where A3 is first column and H3 is last column to read data from.
Yev-704641
Yev-704641
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 75
If you need something in specific cell you could look at this. I was looking for something similar and found it very useful.

http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/70024/
raym85
raym85
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
Points: 376 Visits: 198
couldnt you copy the excel schema into a table form and sync up the rows and columns that way?
Kevin.roberts25
Kevin.roberts25
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 12
try using an open query


SELECT [Col1], [Col2], [Col3] INTO DestinationTable FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\YourFolderLocation\yourFileName.xls;Extended Properties=Excel 8.0')...[WorkSheetName$]

SELECT [Col1], [Col2], [Col3] INTO DestinationTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\YourFolderLocation\yourFileName.xls', [WorkSheetName$])

SELECT [Col1], [Col2], [Col3] INTO DestinationTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\YourFolderLocation\yourFileName.xls', 'SELECT * FROM [WorkSheetName$]')


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search