-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Html table multiple columns #1515
Comments
Same problem in PHPWord 0.15.0, PHP 7.1. |
Also faced this problem. one column - everything works, two or more-an error. The demo example does not work. Has anyone found how to solve the problem? |
indeed, the document seems to open fin in MS Word, not in LibreOffice. |
Actually, LibreOffice does not seem to like the way the tables are written. |
This how I see the output from Sample_26_Html.php in docx (see the file). The output of Sample_09_Tables.php looks fine (at least preserve columns) in libreoffice . opened in google docsopened in libreoffice 5.1.6 ubuntuopened in windows 2007Looks like google is making assumtions on how to render the table, that the others don't do. Probably some essential information is missed or is ambiguous. Looking at the Sample_26_Html.docx_FILES/word/document.xml, I just see empty gridCol. But comparing with a basic table example there is much more information I can't evaluate:
Anyone with experience in ooxml, can check what may be producing these inconsistencies? |
I just experienced this issue as well. I tested and indeed the missing width on the gridCol seems to be the problem. Test html that I used:
Generated the following word/document.xml:
When I manually changed the three w:gridCol to have a Conclusion not having a I did some digging through the code, and the
The So, when are these Cell's created? I looked at this from the other side, starting with the html input. When a td element is found the And that is were my lack of knowledge of word/xml stops me. Just hardcoding a 1 instead of BTW I also tried setting a width trough styles on the td element, however the |
This is:
Expected Behavior
Should show the content of the second row, not only the heading.
Current Behavior
Does not parse a html table with multiple columns
Failure Information
Using the same html from the test HtmlTest.php: testParseTable, the test passes, but the content of the body is not generated correctly, at least opening the file in libreoffice 5.1.62
How to Reproduce
Please provide a code sample that reproduces the issue.
Context
The text was updated successfully, but these errors were encountered: