Download it now!
Bug 37622 - xls file loses formatting
Summary: xls file loses formatting
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.0 RC1
Hardware: x86 (IA32) Windows (All)
: highest critical
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.4.1
Keywords: regression
Depends on:
Blocks: mab3.4
  Show dependency treegraph
 
Reported: 2011-05-26 04:40 UTC by Dries Feys
Modified: 2011-12-22 05:49 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
testfile with 1 bold cell. (6.50 KB, application/vnd.ms-excel)
2011-05-26 04:40 UTC, Dries Feys
Details
Original ODS test document where two cells A6 and A7 lose fomating when saved in XLS (12.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-05-30 02:07 UTC, Petr Mladek
Details
Generated XLS where the cells A6 and A7 lost formating when opened in Lo-3.4.0-rc2 (7.50 KB, application/vnd.ms-excel)
2011-05-30 02:08 UTC, Petr Mladek
Details
Original ODS test document where the last comun C loses fomating when saved in XLS (12.27 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-05-30 02:10 UTC, Petr Mladek
Details
Generated XLS where the last column C lost formating when opened in Lo-3.4.0-rc2 (7.00 KB, application/vnd.ms-excel)
2011-05-30 02:11 UTC, Petr Mladek
Details
Excel file with some bold cells (21.00 KB, application/vnd.ms-excel)
2011-07-01 05:04 UTC, Dries Feys
Details
screenshot to clarify the problem (67.99 KB, image/png)
2011-07-04 00:43 UTC, Dries Feys
Details
LO 3.4.1 forgets border settings (292.40 KB, image/jpeg)
2011-07-05 23:53 UTC, Alexandr
Details
The same file, using OO 3.2.1 (178.98 KB, image/jpeg)
2011-07-05 23:54 UTC, Alexandr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Feys 2011-05-26 04:40:50 UTC
Created attachment 47187 [details]
testfile with 1 bold cell.

When saving a file as xls, with some cells set as bold, and reopening the file in libreoffice 3.4RC1, the data is shown, but the cell isn't bold anymore.
When opening the file in excel (viewer), everything is fine.
Comment 1 vitriol 2011-05-26 04:47:26 UTC
Confirmed for me. Regression from 3.3.2
Comment 2 vitriol 2011-05-27 03:19:19 UTC
Strange behavior...

- XLS saved with Calc and opened with Calc -> All text attributes lost
- XLS saved with Calc and opened with Excel -> Attributes OK
- XLS saved with Excel and opened with Calc -> Attributes OK
Comment 3 Dries Feys 2011-05-27 03:28:21 UTC
I had it when saving in excel 2003, and opening in calc, and also when saving in calc and opening in calc. (in fact, all xls-files I opened in calc are wrongformatted)
Comment 4 Katarina Behrens 2011-05-27 03:57:09 UTC
I'll take this
Comment 5 Petr Mladek 2011-05-30 02:05:31 UTC
It seems to be more complicated. I have created another test document and only two cells lost formating (red number color).
Comment 6 Petr Mladek 2011-05-30 02:07:38 UTC
Created attachment 47295 [details]
Original ODS test document where two cells A6 and A7 lose fomating when saved in XLS
Comment 7 Petr Mladek 2011-05-30 02:08:26 UTC
Created attachment 47297 [details]
Generated XLS where the cells A6 and A7 lost formating when opened in Lo-3.4.0-rc2
Comment 8 Petr Mladek 2011-05-30 02:09:20 UTC
Interesting, I have slightly modified the test document and the last column loses formating.
Comment 9 Petr Mladek 2011-05-30 02:10:12 UTC
Created attachment 47298 [details]
Original ODS test document where the last comun C loses fomating when saved in XLS
Comment 10 Petr Mladek 2011-05-30 02:11:06 UTC
Created attachment 47299 [details]
Generated XLS where the last column C lost formating when opened in Lo-3.4.0-rc2
Comment 11 Nodens 2011-06-08 03:38:41 UTC
Same problem here with version 3.4
If I change some cells in an xls file to bold and then reopen the file, formatting is gone.
If I save the file in ods format and then reopen it, then the formatting is shown correctly.
This doesn't happen in all xls files. Some save the formatting without any problem and others don't.
Comment 12 Nodens 2011-06-08 03:41:23 UTC
Just to add that formatting appears fine in 3.3.2
Comment 13 Nodens 2011-06-08 04:02:45 UTC
I don't know if there is a separate bug for this one, but there also a problem in Calc with column width. If I open the file in 3.4 formatting is gone.
Comment 14 Petr Mladek 2011-06-09 02:43:55 UTC
(In reply to comment #13)
> I don't know if there is a separate bug for this one, but there also a problem
> in Calc with column width. If I open the file in 3.4 formatting is gone.

Nodens, does it happen when you export XLS from LO-3.4? Does it work in L0-3.3. If not, please open a new bug for this. We should keep this bug only for formating lose with LO-3.4 XLS export that did not happen with LO-3.3. We should not pollute it with other import/export bugs. In each case, please attach a test document showing the problem. You should attach it only where it belong, either here or to the new bug.
Comment 15 Nodens 2011-06-09 03:06:16 UTC
Well this happened in every xls I opened after upgrading to 3.4
Anyway, I downgraded to 3.3.2 because of these problems mentioned here.
Comment 16 Petr Mladek 2011-06-09 07:34:32 UTC
It causes data loss. We should do our best to fix it for 3.4.1 => increasing severity and priority.
Comment 17 Kohei Yoshida 2011-06-09 22:03:27 UTC
Ok.  I found the cause.  It was my fault. :-P

I accidentally changed the font lookup behavior while replacing ScfDefList with boost::ptr_vector.
Comment 18 Kohei Yoshida 2011-06-09 22:06:55 UTC
I'll take over this since it's my oops.
Comment 19 Kohei Yoshida 2011-06-09 22:13:07 UTC
Fix committed in master.

http://cgit.freedesktop.org/libreoffice/calc/commit/?id=099fd0fd91485797362259e45b1a971dda0511a3

I'll send a request for review to the list for inclusion into 3.4.1.
Comment 20 Katarina Behrens 2011-06-10 03:06:17 UTC
Reviewed, cherry-picked & pushed
Enjoy 3.4.1
Comment 21 Dries Feys 2011-07-01 04:59:28 UTC
just tried it in 3.4.1. The problem still remains, and isn't solved yet.
Comment 22 Dries Feys 2011-07-01 05:04:46 UTC
Created attachment 48648 [details]
Excel file with some bold cells

Attachment where behaviour still is present.
Comment 23 Katarina Behrens 2011-07-01 05:27:22 UTC
> Attachment where behaviour still is present.

Are you absolutely positive that there are *any* bold cells at all in the attachment? 'cause I don't see them, even after opening the doc in Excel ...
Comment 24 vitriol 2011-07-01 05:41:59 UTC
(In reply to comment #23)
> > Attachment where behaviour still is present.
> 
> Are you absolutely positive that there are *any* bold cells at all in the
> attachment? 'cause I don't see them, even after opening the doc in Excel ...

Yes for me. Cells C2:D3
Comment 25 Dries Feys 2011-07-01 06:07:09 UTC
N2:N3 and U2 too
Comment 26 Rainer Bielefeld Retired 2011-07-01 08:59:54 UTC
With "signprev27251243622.xls" (reporters sample 2011-07-01) and "LibreOffice 3.4.1RC1 - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:103)]" everything seems to be OK for me:

0. downloaded latest sample
1. open "signprev27251243622.xls" with LibO: 
   Bold C2:D3, N2:N3, U2
   Same result with EXCEL Viewer
2. Save as "signprev27251243622_saved.xls" in EXCEL95 format (seems to be
   original document format?), close, reopen
   Bold C2:D3, N2:N3, U2
   Same result with EXCEL Viewer
3. Close all

New Test 
11. open "signprev27251243622.xls" with LibO: 
   Bold C2:D3, N2:N3, U2
   Same result with EXCEL Viewer
12. Save as "signprev27251243622_saved97.xls" in EXCEL97 format (seems to be
   original document format?), close, reopen
   Bold C2:D3, N2:N3, U2
   Same result with EXCEL Viewer

So currently I can't see a problem

@Dries Feys, all:
Can you please contribute complete, useful information instead of information fragments? Thanks!

@Dries Feys:
Please attach your result with lost formatting!
Comment 27 Dries Feys 2011-07-01 10:51:59 UTC
@Rainer Bielefeld : I don't know what you mean with "Please attach your result with lost formatting!" The attached file has lost formatting with me and some other persons.

I admit I wasn't clear which cells supposed to be bold and which not. The given example is the result of an automated batch task which creates the excel-file.
I opened & saved the file before uploading it to remove some sensitive data, also with office 2003.

So, with "signprev27251243622.xls" (reporters sample 2011-07-01) and "LibreOffice
3.4.1 final - WINXP  Professional English UI"

0. downloaded latest sample
1. open "signprev27251243622.xls" with LibO 3.4.1 final: 
   Nothing bold ==> I haven't restarted the pc yet.
   EXCEL Viewer : dunno
   Excel 2003 : bold as expected.

File was generated with excel 2003, but is apparently saved in excel 97 format.

(I'm at home for the moment, so I won't be able to do more tests now - I use 3.3.2 under ubuntu at home and don't have time to install the latest version)

What I'll do next monday or tuesday:
- after the restart of my computer, verify the current behaviour (if that's ok, the installer should give a message to restart the pc after installing LO)
- change my batch task and save the file in a more recent excelformat.

But I surely can say I saved the file in excell2003, in excel97format, and that it opens correct in excel, but not in LO 3.4.1 final, which was released earlier today.

Am I clear enough now, dear Rainer?
Comment 28 Cor Nouws 2011-07-01 15:40:45 UTC
Hi Dries,

Is this a Windows only issue?
I cannot reproduce it on Ubuntu with 3.4.1.
(And indeed, the older 3.4.0 does show the problem too on Ubuntu.)
Comment 29 Rainer Bielefeld Retired 2011-07-02 01:15:14 UTC
I opened all attached test.xls documents, always using applicatino file dialog,  with mentioned LibO version, "LibreOffice 3.4.1RC1  - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:101)]", EXCEL 2010 (Starter version), MS EXCEL VIEWER (12.0.6334.5000). None of my tests showed a formatting loss, EXCEL 2010 also showed the .ods files with correct formatting.

This one really is a tough nut.

The original report is concerning the problem that .xls documents opened in LibO seem to loose some formatting when they are saved as .xls again from LibO, at least formatting is no longer visible in LibO, but is visible in EXCEL 2003. Information concerning LibO localization, exact OS version missing.

If the problem again is reproducible with an old test kit, we still have the old problem, if new test kits will be required to prove, it's a new bug (may be related to this one) that should have a new report.

> Am I clear enough now, dear Rainer?

Unfortunately not at all, dear Dries, although some obscurity no longer exists several relevant information still is missing. 

May I ask you to read  hints on <http://wiki.documentfoundation.org/BugReport> carefully? Currently it's completely unclear what might cause the different observations, and so every little detail might be the key.

I still have problems to understand all details of your problem, so please answer these questions (although some of the details might look irrelevant for you):
0.1. You reopened the report because you do not see any bold in    
     "signprev27251243622.xls"?
0.2. Your comment 25 means:  C2:D3, N2:N3, U2 SHOULD be bold, but they are not 
     in LibO 3.4.1?
0.3. so that Katarina's comment 23 confirms your observations concerning LibO?
1. You opened "signprev27251243622.xls": from 
   LibO OS File dialog? 
   LibO LibO File dialog
   Explorer?
   Else?
   From your HDD?
   Via network?
2. 
3. Your LibO localization is English (only for the sake of completness)?
4. Your "signprev27251243622.xls" nothing bold in LibO means
4.1. Cell C2 does not look bold?
4.2. Bold icon is not active when cell cursor selects C2?
4.3. Bold icon is inactive after double click on cell for every caret position?
5. Do you still see a problem with 3.4.1 and old sample documents?
5.1. If yes, with what ones?
6. Does the problem persist if you rename your user profile before you
   start LibO (It's just a stab in the dark)?

@Cor:
Does not seem to be WIN only, My OS and afaik vitriol's are WIN.

@Katarina
What Excel Version did your use? I already saw bugs only for Viewer or only for particular Excel version or even related to particular settings.
Comment 30 vitriol 2011-07-02 01:44:37 UTC
I just tried to open and save signprev27251243622.xls with LIbO 3.4.1 final under Win, and I can see the bold formatting.
Dries, are you sure that you use 3.4.1 final?
Comment 31 Dries Feys 2011-07-04 00:43:04 UTC
Created attachment 48733 [details]
screenshot to clarify the problem

In the uploaded file, mailaddress wasn't visible, but I can assure it IS the same file & behaviour
Comment 32 Dries Feys 2011-07-04 00:52:10 UTC
Think you may close this one.

The cause is the fact the zoom factor is on 75%, and LibO doesn't show bold anymore when zooming out.

Sorry for the inconvenience...
Comment 33 Alexandr 2011-07-05 23:52:19 UTC
Ok, it's clear with bold. 
But there is something wrong with borders. It seems that 3.4.1 resets cell borders settings.
Comment 34 Alexandr 2011-07-05 23:53:19 UTC
Created attachment 48797 [details]
LO 3.4.1 forgets border settings
Comment 35 Alexandr 2011-07-05 23:54:02 UTC
Created attachment 48798 [details]
The same file, using OO 3.2.1
Comment 36 Cor Nouws 2011-07-06 15:40:16 UTC
@ alexandr: your extra comments for sure is about a diffent issue. Please look for the already existing issue(s) for borders. (e.g. 37133, 38595, ..)
And if necessary, please do add your information there.
Thanks! Cor
Comment 37 Björn Michaelsen 2011-12-22 05:49:55 UTC
RESOLVED, FIXED or CLOSED bugs cant be KEYWORD NEEDINFO.