Home Forums SQL Server 2008 SQL Server 2008 - General Exporting a TEXT (or long varchar) column to an Excel file with the OPENROWSET command. RE: Exporting a TEXT (or long varchar) column to an Excel file with the OPENROWSET command.

  • Not sure what you mean about SSIS not being able to do a "dynamic command string". It can do dynamic connections, and dynamic queries.

    But the main thing you're running into is that Excel isn't really designed for large text data. Does the target file need to be Excel?

    Per Microsoft, Excel 2010 can only go up to a specific number of characters in a single cell. Details here: http://office.microsoft.com/en-ca/excel-help/excel-specifications-and-limits-HP005199291.aspx

    32,767 characters. Only 1,024 display in a cell; all 32,767 display in the formula bar.

    Max column width is 255 characters.

    Edit: Correct Excel limits.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon