We are trying to generate some documents that contain tables and while we can get them to render well in OnlyOffice, we are having issues with the compatibility for users who might want to open these resulting .docx files in Google Docs and Word (to a lesser extent).
Taking this example from your website - it obviously works fine in the inline viewer.
However, on Word this appears as:
And, on Google Docs this appears as:
(also green for some reason relating to the underlying style - not so concerned about that)
In our own examples, Word does a little better when it has content in the cells but Google Docs really fails badly and will limit itself to a fixed width table covering part of the width only.
We tried setting some of the individual cell widths and changing from percentages to twips etc.
We are trying to use DocBuilder to create templates that users can edit in their own preferred editors. Is there a recommended way of getting consistent column widths in tables that will work across the major editors?
Many thanks in advance,
We haven’t seen in a long time:)
I have a few questions:
- Which version of DocBuilder are you using?
Try using this script:
- Are you uploading .docx format to Google Docs using the mentioned script, or are you making any modifications?
Thanks for coming back to me on this!
- Currently I’m just building the docbuilder file and testing it against your TryIt page. I wanted to try to see if I could build consistent templates with all required aspects before implementing this programmatically.
In this case I’m just taking your demos and selecting to Save them as .docx formats and then opening these files in Word (Mac), Office 365 (Browser) and Google Docs.
- So taking this newer example:
If I select the output on that page you’ve linked and select ‘File’ and save as ‘docx’
Then if I open it in OnlyOffice (Desktop), it looks fine:
If I open it in Word (Mac), it also appears fine.
In Office 365 seems to be ok also:
However, in Google Docs it looks like:
So basically - no local installations at all. If you were to save your own example from that script and open it in Google Docs you should probably see the same thing.
The green in Google Docs probably just has to do with inherited style in that example so can be worked around. However, I’ve been unable to set the width of tables or columns using your DocBuilder API and have it work in Google Docs.
Googling there are some possibly related issues (not OO specific): https://github.com/dolanmiu/docx/issues/216
But it seems that Google Docs have form in this area… but if you create a table in Word then it will open correctly with the correct cell and table widths in Google Docs.
And my use case would require anything we generate in DocBuilder to also work in google docs.
Many thanks again for coming back - hopefully this information helps.
Actually I just also noticed that Office 365 has one of the rows missing. Just thought I’d mention it also.
I apologize for the delay in responses.
This is most likely a bug.
We are checking the situation.
I will let you know when I get something.
We have created bug report based on this case.
Thank you for reporting this issue.
Please accept our apologies for the inconvenience caused. We will try to fix the bug in the next versions.