Bug 170580 - FILESAVE: LibreCalc opens .xlsx files created using libxlsxwriter, but can't save them?
Summary: FILESAVE: LibreCalc opens .xlsx files created using libxlsxwriter, but can't ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-03 01:37 UTC by Dan Lewis
Modified: 2026-02-03 21:14 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Lewis 2026-02-03 01:37:11 UTC
I've written a C program that uses libxlsxwriter to create a .xlsx spreadsheet. LibreCalc opens and displays the file without errors and I can sort the data, but when I go to save the edited file, it says that it contains some feature that isn't supported and suggests saving the file in either .odf or .xls format. The only "feature" that the spreadsheet uses is cell comments. The spreadsheet is quite large (~450KB - too large to attach), and every cell with content also has a comment.

It just seems to me that if LibreCalc can read, display and edit a xlsx spreadsheet, then why can't it save it as well?

Thanks in advance,
Dan
Comment 1 ady 2026-02-03 10:46:17 UTC
Are you talking about the typical message that LO shows whenever first-saving as xlsx? The message says something similar to:

This document may contain formatting or content that cannot be saved in the currently selected file format “Excel 2010–365”.

That standard message is a generic info / warning; it does not mean that there is some specific feature that LO is not able to save, but rather that there _might_ (potentially) be such feature. The message appears because of the file format, not because LO is checking the file for specific incompatibilities.

If that is what you understood from that message, you are not the first one.

If you are referring to some other message, please quote it in your next comment.
Comment 2 Dan Lewis 2026-02-03 14:36:09 UTC
Thanks for the response! Yes, that's the message I meant.

But there are other problems: 

(1) If I select the check box to prevent the message from appearing again, it doesn't seem to have any effect. I assume that may be because of (2) below.

(2) Since the spreadsheet is so large, it takes a while to do the save. However, I believe it actually aborts rather than completing the save because:

(a) It leaves a .xlsx# file in the directory, and
(b) When I try to reopen the file after doing the save, it says that the file is        corrupted and puts me into recovery mode.

Maybe it's because the file is too large for Libre or mayCalcbe it's because almost every cell that has content also has a comment attached. I don't know, but it means I can't really use LibreCalc for my work in its present state.

Sigh....
Dan
Comment 3 ady 2026-02-03 21:14:49 UTC
(In reply to Dan Lewis from comment #2)

> (1) If I select the check box to prevent the message from appearing again,
> it doesn't seem to have any effect. I assume that may be because of (2)
> below.

Let's try to separate the potential issues. The message appears on the first save (as xlsx) of the file. If you keep working on the file and then save (again) the same file, the message should not show up again on the same file during the same Calc session.

If you don't want the message to show up _ever_ (i.e. not for this file nor for the next time you save any other file as xlsx), then you change the status of that checkbox.

So, if you don't ever want the question to be asked – it is up to you, I am not saying that you should do it or not – then I would suggest (but only if you really want this to be your setting) starting a new empty Calc worksheet, save it as xlsx, change the checkbox and confirm that the file was saved as xlsx. Close the newly-created file, close Calc and start over, creating yet another empty new worksheet with a new different name. When you save this second file as xlsx, is the message still showing up?


> 
> (2) Since the spreadsheet is so large, it takes a while to do the save.
> However, I believe it actually aborts rather than completing the save
> because:
> 
> (a) It leaves a .xlsx# file in the directory, and
> (b) When I try to reopen the file after doing the save, it says that the
> file is        corrupted and puts me into recovery mode.

The ".xlsx#" file is there when the xlsx file is still "opened". When you completely and correctly _close_ the xlsx file, then the ".xlsx#" should (eventually) disappear. Perhaps it takes some additional time because of its size? If the xlsx file is indeed closed and the ".xlsx#" remains (indefinitely), then when you re-open the same xlsx file Calc assumes that the xlsx file might be corrupted; the same happens with any other type of file (e.g. ods).

> 
> Maybe it's because the file is too large for Libre or mayCalcbe it's because
> almost every cell that has content also has a comment attached. I don't
> know, but it means I can't really use LibreCalc for my work in its present
> state.

This is different than the message issue. Please try to follow the steps I wrote above, in order to separate the "message" issue with the "can't correctly save" issue. I would also suggest allowing more time for Calc to complete the save action, considering the size of the file (whichever that "too large" size might be).

Another possible suggestion, just for a test, could be to hide all the comments that are shown (since that's the only special feature that you mentioned).

In LO 25.8 there are attempts to improve performance related to xlsx files. Your case might be a base to yet another such attempt.

ATM we still don't know whether Calc really has a problem with some specific xlsx feature, or that there is some performance issue when saving this specific file.