How to convert one column to many - table to Excel

  • I have a table with one varchar(1000) column of pipe delimited data. The contents are exported to a .txt file for import to another system via SSIS. This is done daily. Maybe 100 rows per day. The users would now like an Excel file of the contents to assist with reconciliation. I could use and modify the script that populates the table, but I was hoping to avoid that because it seems to change a lot and I'm not always made aware. I guess I could use a cursor and piece apart each column row by row into another table and export to Excel from there. But I thought I'd ask here in case there's a better option within SSIS that I'm not aware of.

    Thanks.

  • Randy Doub (8/15/2011)


    I have a table with one varchar(1000) column of pipe delimited data. The contents are exported to a .txt file for import to another system via SSIS. This is done daily. Maybe 100 rows per day. The users would now like an Excel file of the contents to assist with reconciliation. I could use and modify the script that populates the table, but I was hoping to avoid that because it seems to change a lot and I'm not always made aware. I guess I could use a cursor and piece apart each column row by row into another table and export to Excel from there. But I thought I'd ask here in case there's a better option within SSIS that I'm not aware of.

    Thanks.

    It seems to me that by far your easiest course of action is to spend a bit of time explaining the 'Text to Columns' function in Excel, which will do all the work for you or your users without any need to modify the package. As this is a regular thing, you could almost certainly automate it all within Excel with some straightforward code.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Truth is, these users couldn't handle Excel's text import wizard.

    Anyway, upon further review, I realize I can get at the text file that was exported.

    So I have a delimited text file source and an Excel destination.

    I should have seen that before posting :blush:.

Viewing 3 posts - 1 through 2 (of 2 total)

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