small c# method to substitute in Word .docx using the library Open XML SDK 2.0
$10-30 USD
Completed
Posted about 9 years ago
$10-30 USD
Paid on delivery
We need a small c# method to do the following in a Word document .docx using the library Open XML SDK 2.0
The document is a normal .docx.
In the document we will have a tag=@TEST@
The @TEST@ tag needs to be REPLACED with
{TABLE 1 COL Start}
{ROW1} Bookmark_1 {Tab}{Tab} Bookmark_2
{ROW2} xxx{Tab}{Tab} yyy
{ROW3}{Tab}{Tab}bbb
{ROW3}ccc {Tab}{Tab}ddd
{TABLE 1 COL END}
NOTES:
{RETURN} needs to be a real carriage return \n in the document
{Tab} needs to be a real tabulation (to keep things aligned
{TABLE} is a word Table: There should be NO formatting (no borders applied).
{ROW} is a row in the table
Bookmark_1, and Bookmark_2 are real Word bookmarks which need to be inserted at those locations
OpenXML SDK has all the functionality to do this:
see here for table insertion:
[login to view URL]%28v=office.14%[login to view URL]
see here for bookmark insertion:
[login to view URL]