Bug 66377 - Support formatting/styling of spreadsheet tables originating in Excel's "Format as Table"
Summary: Support formatting/styling of spreadsheet tables originating in Excel's "Form...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:26.8.0
Keywords: filter:xlsx
: 66378 66379 81711 89107 112371 122109 122917 130637 149436 159423 160007 160058 161370 (view as bug list)
Depends on:
Blocks: Calc-Enhancements XLSX XLSX-DataRange 159264
  Show dependency treegraph
 
Reported: 2013-06-29 18:48 UTC by Luke
Modified: 2026-02-18 14:43 UTC (History)
36 users (show)

See Also:
Crash report or crash signature:


Attachments
MS .xlsx file imports incorrectly (468.90 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-06-29 19:10 UTC, Luke
Details
Comparison of xlsx in Excel vs Calc 1-3 (376.59 KB, image/png)
2013-06-29 19:14 UTC, Luke
Details
Comparison of xlsx in Excel 2010 vs Calc 5.0 (231.94 KB, image/png)
2015-05-11 07:56 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2013-06-29 18:48:11 UTC
This bug was tested LibreOffice v4.1 RC1 running in windows 7 and XP. It appears that LibreOffice loses formatting when importing MS .docx files. I have attached an example.

Steps to reproduce the bug:
1. Open attached Demo-2012SummerOlympics.xlsx document in calc
2. Open attached Demo-2012SummerOlympics.xlsx document in Excel2010/Office 365
3. Compare the documents. 

Note item #1 from the screenshot that the rows should alternate from white to blue.
Comment 1 Luke 2013-06-29 19:10:21 UTC
Created attachment 81707 [details]
MS .xlsx file imports incorrectly
Comment 2 Luke 2013-06-29 19:14:36 UTC
Created attachment 81713 [details]
Comparison of xlsx in Excel vs Calc 1-3
Comment 3 Markus Mohrhard 2013-06-29 19:19:29 UTC
THis is the missing Format As Table feature that is currently developed as part of the GSoC project.
Comment 4 Markus Mohrhard 2013-06-29 19:20:35 UTC
*** Bug 66378 has been marked as a duplicate of this bug. ***
Comment 5 Markus Mohrhard 2013-06-29 19:21:21 UTC
*** Bug 66379 has been marked as a duplicate of this bug. ***
Comment 6 Joel Madero 2013-06-29 19:26:11 UTC
Marking as NEW as Markus has confirmed that it's being developed now. Markus - you happen to know who is developing it, then we can move to assigned.
Comment 7 Markus Mohrhard 2013-06-29 19:29:17 UTC
(In reply to comment #6)
> Marking as NEW as Markus has confirmed that it's being developed now. Markus
> - you happen to know who is developing it, then we can move to assigned.

If at all it should be kept in New. It is Kohei and my GSoC student so we are aware of the bug. Please don't assign this bug to the student.

IMO it is bad to force him to look and care bug reports at this stage as he should focus on the tasks he gets assigned by us.
Comment 8 Xisco Faulí 2014-03-31 15:55:41 UTC
This issue is still reproducible:
   - Libreoffice 4.1.5.3 Build ID: 1c1366bba2ba2b554cd2ca4d87c06da81c05d24
   - Libreoffice 4.2.2.1 Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f
   - Libreoffice 4.3.0.0.alpha0 Build ID: b6a43bcbbf9e9a5655fd36fd4c8ef72d585f67b0
Comment 9 Luke 2015-05-11 06:43:20 UTC
*** Bug 89107 has been marked as a duplicate of this bug. ***
Comment 10 Luke 2015-05-11 06:53:33 UTC
*** Bug 81711 has been marked as a duplicate of this bug. ***
Comment 11 Timur 2015-05-11 07:56:25 UTC
Created attachment 115487 [details]
Comparison of xlsx in Excel 2010 vs Calc 5.0

There are some improvements in LO 5.0.
Comment 12 QA Administrators 2017-01-03 19:40:17 UTC Comment hidden (obsolete)
Comment 13 Luke 2017-01-04 02:00:36 UTC
Still not table formatting in Version: 5.4.0.0.alpha0+ (x64)
Build ID: bf80bbb7b75febc2769d6b64e6981224982f8fe2
Comment 14 QA Administrators 2018-01-05 03:41:51 UTC Comment hidden (obsolete)
Comment 15 Aron Budea 2018-05-16 23:51:50 UTC
Same in 6.1 alpha1.
Comment 16 Aron Budea 2019-03-08 06:03:49 UTC
*** Bug 112371 has been marked as a duplicate of this bug. ***
Comment 17 Aron Budea 2019-03-08 06:04:31 UTC
*** Bug 122917 has been marked as a duplicate of this bug. ***
Comment 18 Aron Budea 2019-03-08 06:04:45 UTC
*** Bug 122109 has been marked as a duplicate of this bug. ***
Comment 19 Gabor Kelemen (Collabora) 2019-04-16 14:26:51 UTC
*** Bug 91329 has been marked as a duplicate of this bug. ***
Comment 20 NISZ LibreOffice Team 2020-02-14 07:24:04 UTC
*** Bug 130637 has been marked as a duplicate of this bug. ***
Comment 21 Timur 2022-06-03 12:15:51 UTC
*** Bug 149436 has been marked as a duplicate of this bug. ***
Comment 22 stragu 2023-10-30 22:20:25 UTC
(rewording the summary to better differentiate from bug 132780)
Comment 23 stragu 2023-10-30 22:44:19 UTC
*** Bug 81711 has been marked as a duplicate of this bug. ***
Comment 24 Gabor Kelemen (Collabora) 2024-01-08 16:22:08 UTC
*** Bug 155907 has been marked as a duplicate of this bug. ***
Comment 25 Gabor Kelemen (Collabora) 2024-01-29 19:33:38 UTC
*** Bug 159423 has been marked as a duplicate of this bug. ***
Comment 26 Aron Budea 2024-03-04 01:33:38 UTC
*** Bug 160007 has been marked as a duplicate of this bug. ***
Comment 27 Rafael Lima 2024-03-06 18:34:39 UTC
*** Bug 160058 has been marked as a duplicate of this bug. ***
Comment 28 Volga 2024-03-07 11:50:50 UTC
This is still reproduced in 
Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL threaded

Open attachment 193003 [details] to see the error.

Also see:
https://support.microsoft.com/en-us/office/format-an-excel-table-6789619f-c889-495c-99c2-2f971c0e2370
Comment 29 m_a_riosv 2024-06-02 08:17:00 UTC
*** Bug 161370 has been marked as a duplicate of this bug. ***
Comment 30 Volga 2024-06-02 13:35:18 UTC
You can also reproduce with attachment 193003 [details]
Comment 31 Eyal Rozenberg 2025-05-21 20:51:15 UTC
Rephrased title somewhat to better clarify this is not the same as bug 152711 and bug 151264 (which are about proper table style support for Impress and Writer tables).
Comment 32 Buovjaga 2026-02-07 15:43:25 UTC
Support was recently implemented by Markus and Balázs and attachment 81707 [details] looks great now except for the "Per Participant" column, which doesn't have the odd/even row colouring.

A relevant commit by Markus: 2950f734c5481bf31c7a54471199f87940240fe4
A UI-related commit by Balázs: 0c9a895defba9565437a876285af3698b2c77b6e

To see the Sidebar UI, focus into a cell like B4 and look at what appears at the bottom of the Properties Sidebar deck.

The submenu Data - Table has functionality to insert and remove tables.

Arch Linux 64-bit
Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: bf9c80c873e218b7303dae5c13398a6c9edd1865
CPU threads: 8; OS: Linux 6.18; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 7 February 2026
Comment 33 Balázs Varga 2026-02-10 11:58:48 UTC Comment hidden (obsolete)
Comment 34 Balázs Varga 2026-02-10 12:03:59 UTC
(In reply to Balázs Varga from comment #33)
> (In reply to Buovjaga from comment #32)
> > Support was recently implemented by Markus and Balázs and attachment 81707 [details]
> > [details] looks great now except for the "Per Participant" column, which
> > doesn't have the odd/even row colouring.
> 
> Indeed that last column looks not formatted correctly. Interesting that on
> that last column we have a custom cell style applied named "Excel Built-in
> Percent" which if you set to default and/or then set back to "Excel Built-in
> Percent" it will be fine. If someone have time can minimaze this bugdoc file
> with only the problematic columns and then in a different bugreport can be
> checked and fixed.

Or we can just leave this report open, since I just realized it is complained specifically about that (first - thats good) and last column colors. Probably something went wrong with the applied mix of cell style and table style.
Comment 35 SusanneMohn 2026-02-14 07:27:21 UTC Comment hidden (obsolete)
Comment 36 Buovjaga 2026-02-14 08:00:36 UTC
(In reply to SusanneMohn from comment #35)
> hello
> i treid to test it on Windows 11 with the DEV Release from 12.2.2026.
> I have a small table created in Calc.
> But the menu Data > table does not work: it's grey.
> Where ist is the mistake?

Can you try with attachment 81707 [details] or some other XLSX document that has these types of tables?
Comment 37 Timur 2026-02-15 01:48:00 UTC
I checked the duplicetes. Some are duplicates of FormatAsTable feature, not of XLSX, but I did not change to produce mails. Multiple open correctly now, many are simple samples. 

Remaining to be checked after this one is closed are:
Bug 160058 attachment 193003 [details] is also mentioned here, Supply Chain table appears empty.
Bug 160007 attachment 192920 [details] has no format applied in SGU-solar tab.
Bug 91329 attachment 115661 [details] has words without color.

Note (files uploaded instead of referenced):
Bug 66378 attachment 81708 [details] is the same as attachment 81707 [details] here.
Bug 66379 attachment 81709 [details] is the same as attachment 81707 [details] here.
Comment 38 Commit Notification 2026-02-17 08:22:05 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/10d52f40f8440dd3e97877a1ff71817f0d9ea5c5

tdf#66377 sc ooxml import: fix wrongly applied PatternType

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 39 Buovjaga 2026-02-17 11:53:08 UTC
After the last commit, the Per participant column is looking as expected.