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

Load data into excel file from table but each sheet allow 1000 records Expand / Collapse
Author
Message
Posted Thursday, January 31, 2013 5:54 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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
Posted Thursday, January 31, 2013 6:14 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy 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
Posted Thursday, January 31, 2013 9:31 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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
Posted Thursday, January 31, 2013 6:27 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

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
Posted Thursday, January 31, 2013 11:48 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy 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
Posted Sunday, February 03, 2013 5:29 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

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 »

Add to briefcase

Permissions Expand / Collapse