Page 1 of 1

Convert TableCell to HTML

PostPosted: Sat Jul 27, 2013 10:07 pm
by deraxel
Hi all,

it is prossible to convert the content of one table cell to html or to copy one tablecell to a new document? (then i can convert completly the new document)


Re: Convert TableCell to HTML

PostPosted: Sun Jul 28, 2013 12:11 pm
by jason
deraxel wrote: copy one tablecell to a new document

The contents of a table cell is valid content for body, so yes, you can do this in principle, then convert your new docx to HTML.

This is a good approach only if the contents of your tc very simple:

- If your tc contains images, hyperlinks etc, you'll need to copy the rels though.

- If you have styles and numbering, you'll need those parts in your new docx.

So you might find it easier to clone the original package, then replace the body contents with the tc contents. That way, the rels stays as is.

Alternatively, you could modify the HTML output code to process just a table cell. There are 2 different ways of doing HTML output. HtmlExporterNonXSLT would be the easiest to modify.