How to export to excel with merged cell.

  • 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!!!!

  • Either unmerge the column, or don't use a header at all.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • 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!!

  • 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

  • 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?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • 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

  • Hi Koen,

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

  • 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?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • 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.

  • How do you select the data at the source? Why is the numeric column read as a string column?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply