Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I try to avoid using Libre Office on existing Excel created workbooks because of the potential for unpleasant results. In this case Libre Office bloated the size of the workbook for some reason unknown to me. I would like to know if Libre Office does this to all Excel workbooks or just something in that workbook that causes it.

Software involved:

  • Microsoft Office Excel 2010
  • Libre Office 3.5.x (exact version unknown)
  • Dropbox (merely to sync changes)

Platforms involved:

  • Office on Windows (master of the obvious on that one I suppose..)
  • Libre Office on Mac OS 10.6

Types of data stored in this workbook:

  • Text
  • Integers
  • 1 column with a simple formula spanning the entire worksheet representing that particular row (=CONCATENATE(A2285,B2285,D2285), =CONCATENATE(A2286,B2286,D2286), etc.)
  • Total of 3,500 plus rows

Here is a photo with details described within, but I'll go ahead and explain the photo as well:

  • This screenshot is from Dropbox history of the .xlsx workbook.
  • Version 61 - 68 were Office Excel.
  • Version 69 - 73 were Libre Office.

Drobox file history.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Grab the Open XML SDK 2.0 and run the "Open XML Productivity Tool for Microsoft Office". This is a neat application that lets you perform several analyses on the XML data within an .xlsx or .docx, and should make it easy for you to see where the bloat is by using its comparison tool to compare two documents' contents on an XML level.

There are a few possibilities:

  • LibreOffice may be inserting additional data (font/cell styles, formatting information, etc) that Office treats as "implied" or is contained within your "Normal" template.
  • LibreOffice may not be compressing the data. In case you didn't know, Office uses lossless compression (similar to ZIP) to compress all data in their Open XML formats. I thought LibreOffice is supposed to support that, but maybe there's a problem with the compression in the version the person is running. This is the most likely situation if you don't see significant differences in the data when running the comparison tool.
  • LibreOffice may be re-parsing the data, creating its own internal structure, and saving out the data (using a separate routine) in a way that best fits its own internal representation of the document, which may be less efficient than Office's own. This, if true, would be more of a design problem and indicative of the fundamental differences in the features and technologies used in LibreOffice's native functionality versus Office's.

You can easily rule out the second possibility (compression issues) as follows:

  • Take the ~220K Office version, open it in LibreOffice, add a single character to a single cell, and save it.
  • Install 7-Zip if you don't have it already.
  • Open the .xlsx saved by LibreOffice, and the .xlsx saved by Excel, in 7-zip.
  • Navigate through the directory hierarchy of the archive and find a file (not a directory).
  • Compare the "Size" and "Packed Size". If the sizes of LibreOffice's save are much larger, then LibreOffice is bloating the data itself. If the sizes are nearly the same but the Packed Size is not much smaller than the size, then compression is not being used, or bad compression. On my PC, Microsoft Excel 2010 compresses the _rels.rels file from 588 bytes down to 245, and the xl\styles.xml file from 3037 bytes down to 878.

You can easily rule out the first bullet as follows:

  • Take the ~220K Office version, open it in LibreOffice, add a single character to a single cell, and save it.
  • Run the productivity tool and compare the XML.
  • If the documents are virtually identical except for the very small, contained area where the single character change was made, the first issue (inserting additional data) likely doesn't apply.

If you have ruled out both the first and second issues, then the only possibility that I can see remaining is the third one, which is not so easy to fix and could mean that LibreOffice is "just plain inefficient".

To actually resolve the problem, the first thing I'd do is test a much newer version of LibreOffice. Try their beta/release candidate/whatever happens to be available. Try it on different platforms, such as on Windows, or Linux. See if you can figure out a version or platform that produces more efficient results than others. In general, newer versions (even pre-release versions) are more likely to contain a resolution to your issue than older versions.

share|improve this answer
    
I didn't at first notice your answer when commenting on the post by "M K" mainly because the Firefox add-on "Stack Alert" presents a new post on the toolbar as Last In First Out and then when it goes to the content it anchors it so that I wasn't aware of your post. Your information left here is above and beyond what I had expected. I'm going to apply some of those tests in due time. The compression test was already proven valuable and probably the cause as far as I can tell. –  Sn3akyP3t3 Oct 22 '12 at 11:18

I don't know why this bloat exists, but I'll provide an explanation that you could verify yourself.

All .xlsx (or for that matter, .docx, .pptx) files are compressed files. If you rename a .xlsx file to .zip and open it (or uncompress it), you'd find several files and folders within it.

From your screen capture, it seems like LibreOffice is not really compressing the data when it creates the files. You can easily verify this by renaming one version from Excel and one version from LibreOffice to .zip, uncompressing them and looking at the individual files and folders. It's likely that the uncompressed sizes would match in sizes.

You could also ask this question at the Q&A site for LibreOffice at http://ask.libreoffice.org.

share|improve this answer
    
Wonders never cease! I didn't know that StackExchange site existed. I'll move this question to there since it is more appropriate in scope. Also, I didn't know that you could do that .zip trick. I conducted a quick test and found that you seem to be right on spot with that. No need to rename and unzip if you just right click and 7-zip decompress. –  Sn3akyP3t3 Oct 17 '12 at 0:19
1  
ask.libreofficeorg may look like a SE site, but it is not a SE site. It is powered by AskBot and run on LibreOffice infrastructure. It has nothing to do with SE other than almost perfectly copying its UI patterns. Furthermore, I am not sure that this answer actually adds anything that I didn't already say in my answer; your "renaming" trick is completely unnecessary, even for zip programs other than 7-zip, since the file format is defined by data within the file, not by its name. –  allquixotic Oct 17 '12 at 14:37
1  
@allquixotic I was about to edit out the StackExchange reference for ask.libreoffice.org, but slhck has already done it. –  M K Oct 17 '12 at 14:48
    
@allquixotic When I started typing out my answer, there were no answers to this question. When I finished composing it and posted it, there was one answer (yours). So it's not like I copied your answer. The renaming "trick" is useful on platforms where a program like 7-Zip is not easily available (like Mac OS 10.6 mentioned in the question). –  M K Oct 17 '12 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.