Quantcast
Channel: html2openxml Discussions Rss Feed
Viewing all articles
Browse latest Browse all 228

New Post: Table Cell Paragraphs

$
0
0
I can add a class name (nospacing) to a table tag but not sure how this would automatically apply a paragraph style to paragraphs within the table since the paragraphs are automatically added by the HtmlToOpenXml library?
<table class="nospacing"> <tr> <td> <p class="?????"></p> </td> </tr> </table> I know how to add a paragraph style to the document and I can understand finding all paragraphs within a table using something like this ...

foreach (var table in mainPart.RootElement.Descendants<Table>())
{
foreach (var para in table.Descendants<Paragraph>())
{
// apply paragraph style  ....
}
}

and then manually applying the style to each paragraph.

But imagine there is a much nicer way to do it.

Viewing all articles
Browse latest Browse all 228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>