-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add individual styles to Tables #18
Comments
Have you tried adding a style with table properties? I don't remember but this might already work to some degree. At least Line 1847 in ba77b91
|
Interesting, I gave it a quick try but it didn't change anything. It looks like the tblStyle tag doesn't get written into the docx file. I need to look into it more, but I think it shouldn't be too hard just to pass in a string into TableProperties, which would bypass all of the cell borders, spacing etc elements. Adding a style in the docx file seems pretty simple, it looks like just adding a I tried it, but for some reason I can't zip the folder back together to create the docx file. I'll play around a little, and see if I can get it working.
|
The zip file cannot have a top level folder, but standard tools usually add that. You can check in the WriteDocx code how ZipFiles.jl is used for that |
And I'll have to make a test case for the table styles, I don't think I had one. |
Ahh ok thanks, yeah just zipping a folder higher works. Just adding that one line I'll play around, maybe I can make a pull request. |
Enhancement - it would be great to be able to apply individual Table styles.
Similar to what you can do in the python-docx package.
https://www.geeksforgeeks.org/working-with-tables-python-docx-module/
https://python-docx.readthedocs.io/en/latest/user/styles-using.html
For example:
<w:tblStyle w:val="TableGridLight"/>
The text was updated successfully, but these errors were encountered: