lukasjarosch / go-docx

Replace placeholders inside docx documents with speed and confidence.
MIT License
204 stars 47 forks source link

how to replace with slice element #30

Open wzhsh90 opened 1 month ago

wzhsh90 commented 1 month ago

I need generate table tr by dynamic , is there a way to do that ?

1

wzhsh90 commented 1 month ago

The library github.com/legion-zver/go-docx-templates can dynamic generate tabe row. But your's replace is better.

kavinsan commented 1 month ago

@wzhsh90 word docs are essentially zip files, you can unzip and modify the code yourself. I would recommend using a xml parser against these files to search and manually add table row elements

TeCHiScy commented 1 month ago

The library github.com/legion-zver/go-docx-templates can dynamic generate tabe row. But your's replace is better.

Thanks for the input. Seems this issue is closely related with #11, #24, #28. I will dig into the package you mentioned.