SQLTeam.com | Weblogs | Forums

Export Data into Doc Format


#1

Hi Expert,

I have one column EmpDetail Varchar(max) name and it is store data into HTML data (resume of user).

There are 1000 records are store into EmpDetail column.

Now I want to export that each record in word format in a folder and keep seprate record wise.

Please help.


#2

Just export it as an HTML file instead of trying to convert it to Word. I'm pretty sure that word will open an HTML document.


#3

Yes but it is showing like this :

CATERINA PAPALIA<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

1601 TEDDINGTON DR.

CHARLOTTE, NC  28214

<P class=MsoNormal style="MARGIN

#4

Did you just try opening it as an XML file or a text file?


#5

I'm trying to open in docx.

Is there any sql script / Function / Tool to convert them in docx.

I need to convert more than 1 lakhs records.


#6

I don't do this sort of thing. I suspect your best friend will be "Yabingooglehoo" at this point. Search for "CONVERT HTML TO WORD".


#7

The issue here, as I see it, is that SQL will not parse HTML and without that you cannot safely remove TAGs - which may be nested, or "broken" and all sorts ...

... use something outside SQL to remove the TAGs, which probably needs to be something that can parse HTML / XML and create a proper TREE which it can then clean up.

RegEx solutions etc. just plain don't work IME.

I have seen tools in Cut & Paste data-entry boxes on web forms that offer a "Word Cleanup Content after Paste", they would be Javascript I suppose, but maybe something from those stables offers a solution?