Exporting data of type TEXT to Excel

  • Hi there,

    I have some xml stored in a table col of type TEXT, can anyone assist me getting this correct using the following:

    INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\ExtractTables\ExcelFiles\SQL2000\SQL2000Tables.xls',

    'SELECT * FROM [ApplicationXMLConfig$]')

    SELECT xmlconfig from DatabaseName.dbo.Applications

    I keep getting a truncate error message because the values are greater than 8000 chars (i think)

  • I'm pretty sure Excel won't allow you to do that.

    Why not export the XML to text files instead of Excel?

    - 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

  • The SQL script is part of a SQL file that contains several exports to excel sheets.

    I have them all working fine, but because the xmlconfig col of the applications table contains fully qualified XML I need to find a way of exporting this information as well.

    I could create a txt file, but I'd prefer to keep all exporting to excel as the SQL script is part of a batch file run to obtain backups from remote sites.

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

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