[Solved] Option - Calculation - partially lost XLS

Discuss the spreadsheet application
Post Reply
nekrub2
Posts: 1
Joined: Thu Aug 29, 2019 6:24 pm

[Solved] Option - Calculation - partially lost XLS

Post by nekrub2 »

Dear all

I use Calc for database functions such as DSUM. Some of my criteria are "begin with" xxx*. Under openoffice file format I get the right result when setting in the options "enable regulars expressions in formulae". However, when I save the document as xls and later reopen it, this option is ticked off.

This is a bit cumbersome. Any clue what I can do to have this option always active, irrespective of the format?

sample
• A        B               C            D          E
1 Label1   Amount          Criteria     Label1     Amount     
2 14111    50                           141.*      70
3 14135    20


Formula: =DSUM(a1:b3;d1;d1:d2) expected amount = 70
Attachments
dsum_example.xls
DSUM Functions with placeholder in criteria - MS Excel format
(9 KiB) Downloaded 87 times
Last edited by nekrub2 on Sat Aug 31, 2019 4:21 pm, edited 3 times in total.
OpenOffice Version 4.1.6 on Windows 7
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Option - Calculation - partially lost when saved as XLS

Post by RusselB »

Welcome to the Forums.
It sounds like you have encountered, yet another, discrepancy between OpenOffice and MS Office.
The .XLS format is, despite popular opinion, not a true international standard, as the encoding sequences for the .XLS format files from back in Windows 3.1 days are different from those used today.
It is best to save your work using the Open Document Format, which uses the .ods extension. You can look at this tutorial to see the differences between the Open Document Format(s) and the MS Office format(s). While the tutorial is based on Writer vs. Word, the same principles apply to Calc vs. Excel.

If you want to ensure proper results, save the file as a .ods file. MS Office after, I believe, 2007, will work with the .ods format.

The Enable Regular Expressions setting might not be saved in the .xls format, in which case it's impossible to force the setting to be saved.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Option - Calculation - partially lost when saved as XLS

Post by Villeroy »

Excel does not support regular expressions in formulas.
OpenOffice is a dead project. Install https://libreoffice.org/ instead. It offers more Excel compatibility, including wildcards instead of regexes, most of Excel's formula syntax and xlsx. However, you should always save in the native file format of the application you are using. Do not use LibreOffice as a univeral document loader. Sooner or later it will hurt you.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply