Created attachment 200621 [details] Sample XLSX The attached sample was created in Excel, and has a couple of simple conditional formatting rules with various "Specific text" conditions. Open and save the file back to XLSX in Calc, then try opening it in Excel. => Excel fails to open the file cleanly. When attempting repairs, it claims: "Removed Feature: Conditional formatting from /xl/worksheets/sheet1.xml part" Observed using LO 25.8.0.0.alpha0+ (736998ccef0bacdd2bbf038c98dacfbe654f1a4d) / Windows. If one: - unzips the saved XLSX, - executes the following command (can be done in Linux/Cygwin, needs xmllint installed): find . -name "*.xml" -type f -exec xmllint --output '{}' --format '{}' \; ...they can find this in /xl/worksheets/sheet1.xml: <conditionalFormatting sqref="A1:C1"> <cfRule type="containsText" priority="5" operator="containsText" aboveAverage="0" equalAverage="0" bottom="0" percent="0" rank="0" text=""ABC"" dxfId="3"> <formula>NOT(ISERROR(SEARCH(""ABC"",A1)))</formula> </cfRule> </conditionalFormatting> Comparing the same part in the original file, the extra quotes (""" instead of "") stand out in the original, ie. the quotes aren't escaped properly: <conditionalFormatting sqref="A1:C1"> <cfRule type="containsText" dxfId="3" priority="4" operator="containsText" text=""ABC""> <formula>NOT(ISERROR(SEARCH("""ABC""",A1)))</formula> </cfRule> </conditionalFormatting> Manually adding the extra quotes, and zipping the files with XLSX extension makes the file openable in Excel. Before the below commit in 6.2 (and its 6.1 backport), the part between the <formula> tag wasn't written at all, and the result could be opened in Excel, but the conditional formatting wasn't shown correctly. https://git.libreoffice.org/core/commit/e77596be879c25f5766b73a2f67cf0ddf7775ccc https://cgit.freedesktop.org/libreoffice/core/commit/?id=e77596be879c25f5766b73a2f67cf0ddf7775ccc author Markus Mohrhard <markus.mohrhard@googlemail.com> 2018-07-14 15:16:46 +0200 committer Markus Mohrhard <markus.mohrhard@googlemail.com> 2018-07-15 00:36:18 +0200 tdf#117816, work around MS Excel bug with containsText cond format
Aron Budea committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/55169df2f6e4f8deb9c042b81cc3ff4f01cbf522 tdf166413 sc: escape quotes in XLSX cond. formatting fixed formula It will be available in 25.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.
Aron Budea committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/d1250d073fa978163eb86e4bd8aedcacbdd7895b tdf166413 sc: escape quotes in XLSX cond. formatting fixed formula It will be available in 25.2.4. 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.
Tested with the sample file provided and: Version: 25.2.4.0.0+ (X86_64) / LibreOffice Community Build ID: 3176efaa5df50c202a6e45cd219d1f458fd3bded CPU threads: 20; OS: Linux 6.12; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded The file opens normally in MSO now. Thanks for the fix.