SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to export to excel with merged cell.


How to export to excel with merged cell.

Author
Message
avdhut.k
avdhut.k
SSChasing Mays
SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)

Group: General Forum Members
Points: 619 Visits: 266
Hi,
I am using SSIS 2008 R2,My requirement is to export the data from sql to excel,
but in excel format,three columns in header are merged,due to this only one column below it displaying the data,and rest of the two columns remains empty.

But I want data in those two columns also.


Attached the sample excel file.

In this,Date Column is merged of three cells.

But below this I want to display data of three columns.

Please help me!!!!
Attachments
1_Delegency_Report.xlsx (34 views, 73.00 KB)
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60609 Visits: 13297
Either unmerge the column, or don't use a header at all.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
avdhut.k
avdhut.k
SSChasing Mays
SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)

Group: General Forum Members
Points: 619 Visits: 266
I cant remove the Merge columns,since this is user requirement.

Attached Herewith is excel file for my requirement.
In this First two rows are merged.


My data is exporting correctly,but my problem is numeric data is stored is stored as text.
My user want this in numeric.

Please help me !!
This is urgent to me.

Thanks in advance!!
Attachments
50_Daily_disb_report.xlsx (15 views, 9.00 KB)
John Mitchell-245523
John Mitchell-245523
SSC-Dedicated
SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)

Group: General Forum Members
Points: 33661 Visits: 16649
Please will you post the DDL (CREATE TABLE statement) and a few sample rows for the table you're exporting from? How many rows are you exporting?

John
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60609 Visits: 13297
avdhut.k (10/17/2013)
I cant remove the Merge columns,since this is user requirement.

Attached Herewith is excel file for my requirement.
In this First two rows are merged.

My data is exporting correctly,but my problem is numeric data is stored is stored as text.
My user want this in numeric.



If your user wants a pretty formatted Excel file, you should use SSRS instead of SSIS.

Anyway, what is the data type of the numeric column in the SSIS data flow?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
avdhut.k
avdhut.k
SSChasing Mays
SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)

Group: General Forum Members
Points: 619 Visits: 266
Create Table Temp2
(
channel varchar(10),
forthedatent Int,
forthedate Numeric(12,2),
forthemonthcnt Int,
forthemonth Numeric(12,2),
)

Insert Into Temp2
Values ('Others',0, 0, 16, 1000),
('a',1, 1000.00, 14, 1000),
('TOTAL',1, 1000, 30, 2000)

Select * from Temp2
avdhut.k
avdhut.k
SSChasing Mays
SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)

Group: General Forum Members
Points: 619 Visits: 266
Hi Koen,

Datatype of the Numeric column in SSIS is UNOCODE [DT_WSTR]
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60609 Visits: 13297
avdhut.k (10/17/2013)
Hi Koen,

Datatype of the Numeric column in SSIS is UNOCODE [DT_WSTR]


That's a string datatype. And you're surprised the data is exported as text?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
avdhut.k
avdhut.k
SSChasing Mays
SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)SSChasing Mays (619 reputation)

Group: General Forum Members
Points: 619 Visits: 266
No,But I want it to stored as Numeric,
Please tell me is there any way to do this.

I also tried to change the SSIS Excel Destination Datatype,thruogh advanced editor,but it is not updated through this.
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60609 Visits: 13297
How do you select the data at the source? Why is the numeric column read as a string column?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
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