Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Export top(n) rows from Excel Expand / Collapse
Author
Message
Posted Friday, November 16, 2012 9:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 21, 2013 1:42 PM
Points: 8, Visits: 20
Hi,

I am trying to export only top (100) rows from an excel source. I added the excel file to the source, went to Source properties and changed the OpenRowset from Sales to Sales$A2:D101, so that it would read only first 100 rows. Now, the excel source gives me an error saying "The external columns of component "Excel Source" are out of sync with the data source...."

Can someone please tell me where am i going wrong?

Thanks
Post #1385753
Posted Monday, November 19, 2012 4:26 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, May 14, 2014 5:30 AM
Points: 880, Visits: 669
if you will use ssis
pls follow given steps.
(1)create excle connection..
(2) go to excel sourse after that Data acess mode:sql commane
SELECT TOP 100 *
FROM [Sheet1$]

(3) after map the excel sourse to oledb destination...
Post #1386290
Posted Thursday, November 22, 2012 11:05 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 21, 2013 1:42 PM
Points: 8, Visits: 20
Thanks much :)
Post #1388039
Posted Friday, November 30, 2012 4:11 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 26, 2014 6:36 AM
Points: 42, Visits: 318
col1 col2 col3
5.0 6.0 3.5
9.5 9.8 6.3
9.0 6.0 8.0
Col4 col5 col6
9.5 6.0 8.0
6.3 9.3 3.9
8.7 8.0 8.8
9.0 8.3 6.9
8.6 9.0 6.2

I have data like this in excel, how to load into 2 different tables
first table contain col1,col2,col3 as columns
second table contain Col4,col5,col6 as columns.

Note: Here the number of columns are fixed(3).
Post #1391193
Posted Friday, November 30, 2012 4:35 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:12 AM
Points: 5,142, Visits: 4,930
raghavender.2369 (11/30/2012)
col1 col2 col3
5.0 6.0 3.5
9.5 9.8 6.3
9.0 6.0 8.0
Col4 col5 col6
9.5 6.0 8.0
6.3 9.3 3.9
8.7 8.0 8.8
9.0 8.3 6.9
8.6 9.0 6.2

I have data like this in excel, how to load into 2 different tables
first table contain col1,col2,col3 as columns
second table contain Col4,col5,col6 as columns.

Note: Here the number of columns are fixed(3).

Do not hijack other peoples threads, you have already created your own thread here, please be patient, we are all unpaid volunteers who help in our spare time.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1391211
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse