Error with .docx & tables (steps to reproduce provided)

Hi.
I created a docx file using LibreOffice 4.
I used tables inside the document - about 14 pages long.
The tables were 1 column By 2 rows.

When I saved it, shut down libreoffice 4 then opened the document again, the tables were gone! That is:

  • The text was still in the document but the tables (which contained the text) were gone.

I had to save it in .ODF format so that LibreOffice 4 would keep the tables.

Has this been documented as an error yet?

Thanks.

EDIT:

I Right Clicked on the desktop

New>Microsoft Word Document

And the Document is created by LibreOffice 4 from the outset.

I didn’t Import/Export the .docx file.

(and I don’t have MS Office installed on that Computer)

Just so you know. Thanks.

Test Documents:

I was going to upload the documents …but I cant without a “Karma > 3” on this site.
It only takes a minute or so to reproduce if you can just try it as per the instructions:

(1) create the .docx document as above (ensuring LibreOffice4 creates it)
(2) open it
(3) add seven 1 column by 2 row tables.
(4) in the first row put 5 lines of gibberish
(5) in the second row put 20 lines of gibberish - Let the tables overflow onto 2 pages if you like for some of them
(6) save
(7) close
(8) open the file again.
Result: the tables are gone. Only the text remains.


UPDATE

Here is the Test File: Thanks for enough Karma.

  1. open LibreOffice4,

  2. press any key, then save as .docx.

  3. copy and paste the tables from this file: Input.odt

  4. save and close the .docx file you created.

  5. open it in LibreOffice4 again.
    Result expected: tables are removed, but text still exists.
    Here is the result I get ( I expect you will get the same): [NOTE: this site does not allow uploading a docx file. - The result.odt file here is a docx file renamed as odt. You need to rename the extension back to .docx.] Result.odt


Critical Conditions

Potential Reasons that might affect replicating this:

  1. Version LibreOffice 4.0.2.2

  2. I originally had installed by factory default MS Office 2010 Starter. But I uninstalled it because it was severe in ads, and super crippled.

  3. (This is likely the reason I have a right click> create new .docx file.)

I think the above scenario might be the cause (ie there must be some .net feature still creating the .docx file)

Note that Libre Office4 will be a smaller file size than a docx file created using the microsoft tools.

  1. therefore this problem is not with using a .docx file created by LibreOffice4 as I first thought. it is a problem with using a .docx file created by MS tools.

In summary there is an error under the circumstance of using a .docx file created with microsoft tools. (you can see by the results.docx file that is in the original post).

I hope this helps those of you who are trying to confirm this.

Thanks.

What does “I used tables inside the document - about 14 pages long. The tables were 1 column By 2 rows.” mean? Are the tables very large i.e., multi-page? How many tables were there? A single column table is unusual, as plain text would be just as effective. The answer below by Edmund is really just stating that the level of DOCX support is variable. LO will always “import” any non-native format. It has to. We probably need an example document to test.

um, to test: (1) create the document as above (making sure LibreOffice creates the .docx file), (2) open it with LibreOffice 4 by double clicking (3) then put 7 1colBy 2 row tables. (4) put 5 lines of gibberish in the top row, and 20 lines of gibberish in the bottom row. (5) Let the tables go over one page long if you like on some of them. (6) Save the docx file. (7) close the file. (8) open the file again. The Tables disappear - only the text remains.

The problem is your DOCX is plain ASCII text. Testing both your files with the linux file command reveals this and indeed the second can be opened by a plain text editor. I had no problem editing your first file and re-saving it as a DOCX, and then subsequently opening it again. It sounds to me like the process you are using for creating a DOCX is not working or defaulting to ASCII or similar. I would test that. The DOCX handling by LO in relation to this question appears fine.

Hi, That being the case (i will check too, but I believe you), should LO4 give a warning? I realize that somehow the right click mechanism is not creating a docx now, however LO4 gave no warning, and saved without complaint, until I close it, then open the document again. Perhaps a warning like you get when saving a JPEG to a BMP or similar like “This is a plain text file, you cannot add any formatting to this document.” - or better yet: “disable all formatting toolbars” so the user knows for sure? Thanks.

I would agree with this. Generally saving to a non-default format does produce a warning, however if you have set your file format default to DOCX then it may not register. It still sounds (to me) like something is not being registered correctly at the O/S level. Your point about having “MS Office 2010 Starter” installed and then removed may be related.

@hmmmmObserved I have upvoted your question so you should now have enough karma to upload a test file. I followed your instructions as best I could, although I do not have the option to right click on the desktop and select a “Microsoft Word Document” entry. In any case, this is what I did:

  • Started LO Writer.
  • Insert table with 1 column and 2 rows.
  • Paste some text into the first row (7 lines, 1 paragraph) and second row (23 lines, 3 paragraphs).
  • Select and copy this table and paste it six more times, for a total of 7 tables.
  • Export as PDF to show contents.
  • Save as Word 2007/2010 DOCX.

The results are here (download file, rename from JPG to ZIP, extract PDF/DOCX). The DOCX behaves fine here under Windows 7 with LO v4.0.2.2.

EDIT: Update to reflect my comment against the question and testing of the provided ODT file. Your workflow process for creating the DOCX appears to be flawed. I am re-attaching your documents (ODT and DOCX → renamed as TXT) and my test results (DOCX under linux and Win7). Rename the JPG to a ZIP and extract the contents.

I imagine that your process of right-clicking on the desktop to create a “Microsoft Word Document” is actually not working and that what is being created is an ASCII text file, which of course when saved (regardless of extension) loses all formatting. If this is the case, then the issue is a Windows one. If however you open the ODT; File > Save As… > Microsoft Word 2007/2010 XML (.docx); and this results in a loss of formatting it could be an LO issue. You will need to test this.

You can look bugs from https://www.libreoffice.org/bugzilla/query.cgi - be sure to choose LibreOffice as product before search.

This is known problem - never use import/export to/from proprietary formats especially such as .docx!

OpenDocument is already widely used in several countries and besides - LibreOffice is and remains free and can be downloaded from internet. Unlike MS Office you cannot download freely…

Since Microsoft hides its specifications and I would say, that Office Open XML (OOXML - http://en.wikipedia.org/wiki/Office_Open_XML) is too complicated to implement even it will be available - so better is to avoid OOXML at all.

Even if Microsoft is the member of OASIS (https://www.oasis-open.org/member-roster), who develop OpenDocument - MS Office still do not support OpenDocument properly and certainly Microsoft will not give OOXML specs away…

E.g. LibreOffice Writer offer two versions of OOXML - first one is from MS Word 2010 and second one is from OOXML standard itself. So - even MS Word 2010 will not meet Microsoft’s own standard - what we can say…

Hi Edmund,
I sympathize with the situation fully.

I Suppose I can distribute my documents as pdf files once I finish editing them.

Im not pointing my finger at LibreOffice, when I say this:

It seems distributing editable documents these days requires all parties to use the same editor - throughout the life of the document.

  • otherwise we risk ruining the document each time it is edited in alternative editors.

Again I dont blame LibreOffice.

In a way however, I think all word editors should have their own format that no one else is allowed to support. that way everyone will know those formats have a 1:1 relationship.

Otherwise people are doing exactly the same work from scratch (albeit with a specification). In a way this seems silly.

thanks.

LibreOffice compatibility with OOXML (Microsoft’s “Open” format) is a “work in progress”.

I just downloaded your sample ODT and saved as DOCX. It looks as expected (as a table) both in LibreOffice and in MS Office 2010.

I’m using LibreOffice 4.0.3.1 under Windows XP x86 SP3

Maybe this bug is already fixed?

in reply to oweng

Hi, That being the case (i will check too, but I believe you), should LO4 give a warning? I realize that somehow the right click mechanism is not creating a docx now, however LO4 gave no warning, and saved without complaint, until I close it, then open the document again. Perhaps a warning like you get when saving a JPEG to a BMP or similar like “This is a plain text file, you cannot add any formatting to this document.” - or better yet: “disable all formatting toolbars” so the user knows for sure? Thanks.

I seem to be having a similar/ related problem with a file that was created in LO (4.1.2.3), saved as a .docx it then opend fine in LO but not in Word (2010)

Duncan, it would be better to ask a separate question unless the DOCX is somehow being saved as ASCII text, as that is the problem in this thread. Be sure to include as much detail as possible in your question so that others can try and reproduce the issue.