Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 General Discussion
»
Load data into excel file from table but each...
Load data into excel file from table but each sheet allow 1000 records
Rate Topic
Display Mode
Topic Options
Author
Message
viveksvkola
viveksvkola
Posted Thursday, January 31, 2013 5:54 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 09, 2013 10:37 AM
Points: 145,
Visits: 75
Hi All,
This is Vivekanand,i have one requirement in ssis that is load data into excel file from table.Table contain 10000 records but each sheet in excel file allow 1000 records only using single DFT.Can any one give information how to resolve the requirement.
Thanks,
Vivekanand,
viveksvkola@gmail.com
Post #1414040
Koen Verbeeck
Koen Verbeeck
Posted Thursday, January 31, 2013 6:14 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:51 AM
Points: 9,373,
Visits: 6,470
The first thing you need to know about SSIS is that it is not flexible or dynamic.
If you say you have 10,000 rows and you need 10 Excel sheets, then it cannot change later on. You create 10 destinations and you stick to those 10 destinations.
If you are sure of your 10 destinations, you can simply read the 10,000 rows, add a rowcount and use the conditional split to route the rows to the 10 different destinations (you can use the modulo function).
Another option, if you need to be a bit more dynamic, is to loop over the table, read 1000 rows in each iteration and write it each time to a different sheet (use an expression on the destination).
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1414064
viveksvkola
viveksvkola
Posted Thursday, January 31, 2013 9:31 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 09, 2013 10:37 AM
Points: 145,
Visits: 75
Hear you have create excel sheets dynamically while loading data into excel.can you provide steps of easy to reach
Post #1414222
dwain.c
dwain.c
Posted Thursday, January 31, 2013 6:27 PM
SSCrazy
Group: General Forum Members
Last Login: Today @ 12:39 AM
Points: 2,345,
Visits: 3,189
viveksvkola (1/31/2013)
Hear you have create excel sheets dynamically while loading data into excel.can you provide steps of easy to reach
I'd be interested in hearing how to do that too!
And most especially if there's a way to create a new worksheet based on an existing one.
No loops! No CURSORs! No RBAR! Hoo-uh!
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Are you too recursively challenged?
Splitting strings based on patterns can be fast!
Post #1414418
Koen Verbeeck
Koen Verbeeck
Posted Thursday, January 31, 2013 11:48 PM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:51 AM
Points: 9,373,
Visits: 6,470
You use a CREATE TABLE statement in an Execute SQL Task:
Creating Excel Worksheets Dynamically in SSIS
@dwain: you can use a script task to get the metadata from an existing sheet. Then build your CREATE TABLE statement dynamically, put it in a string variable and use that variable in the Execute SQL Task.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1414453
dwain.c
dwain.c
Posted Sunday, February 03, 2013 5:29 PM
SSCrazy
Group: General Forum Members
Last Login: Today @ 12:39 AM
Points: 2,345,
Visits: 3,189
Koen Verbeeck (1/31/2013)
You use a CREATE TABLE statement in an Execute SQL Task:
Creating Excel Worksheets Dynamically in SSIS
@dwain: you can use a script task to get the metadata from an existing sheet. Then build your CREATE TABLE statement dynamically, put it in a string variable and use that variable in the Execute SQL Task.
Actually I was wondering if it can be done through an OPENROWSET query. I should have been more clear.
No loops! No CURSORs! No RBAR! Hoo-uh!
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Are you too recursively challenged?
Splitting strings based on patterns can be fast!
Post #1415080
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.