Created attachment 84465 [details] spreadsheet demonstrating the bug Problem description: Consider the following cell format : [<0.05][BLUE]"small";[<0]"negative";@ it should print "small" for numbers between 0 and 0.05, "negative" for negative numbers and treat all other data as text. Steps to reproduce: Try entering a number like 42 into a cell formatted with the expression above. Current behavior: When you enter a number like 42, the cell remains empty. Expected behavior: The cell should print 42 formatted as text. This is the way it works on MS Excel. Operating System: All Version: 3.5 all versions
It's because the equation is wrong. The way you have it you could have two values (let's say you put in -10, it's both less than 0.05, and less than 0). This is an incorrect formula. Please go to the user list or ask.libreoffice.org to ask for help in how to correctly format the formula. Closing as NOTABUG
There are real life XLS documents that don't render properly in LibreOffice because of this. Have you at least looked at the attached document ? If you still think this is not a bug, please post a link to the help page which describes this syntax in LibreOffice.
Yes I have and it's because your formula is wrong - please ask the user list for help as this isn't the appropriate place to get help on these kinds of things. You can't have a formula that has two true statements (because again, if you put in a value less than 0, two different statements would be true). ... nevermind I just did it so here is the formula: [<0]"negative";[<0.05][BLUE]"small";@ If you need an explanation of why you can ask the user list as I'm not exactly sure ;) I just played around with it and checked out this wiki: https://help.libreoffice.org/Common/Number_Format_Codes Best, Joel
Please stop redirecting me to the user mailing list. I am not a user asking for help, I am not writing a spreadsheet wondering how to write a formatting expression. I'm a tech guy trying to understand why some XLS documents don't render in the same way in LibreOffice as in Microsoft Office. The documentation doesn't say anything precise about those brackets expressions : https://help.libreoffice.org/Common/Number_Format_Codes#Conditional_Brackets "You can use any combination of numbers and the <, <=, >, >=, = and <> operators." It does never say that it's forbidden to have overlapping conditions nor does it say what happens in this case. And that's the problem I'm reporting in this ticket, this behavior should be documented and preferably be the same as in MS Office in order not to break documents which in not the case now.
The documentation is a wiki - feel free to update it to reflect what is needed (it's literally written by users/contributors). But now you're providing additional info that was not in your original report. Your saying that the same formula works in Excel but not in LibreOffice . . . please attach a xls file that demonstrates this (you only attached an ods file which I presumed meant you were only working with LibreOffice as Microsoft has yet to fully support open document standards). I'm moving this back to UNCONFIRMED just because I'm curious ;) P.S. Please don't get offended that I directed you to user list, we deal with literally thousands of users and tens of thousands of bug reports - we can't be answering user questions and I had no indication that you were anything but a user asking a user question. 99 out of a 100 that presumption is correct and saves EVERYONE a lot of time
Created attachment 98502 [details] xls file demonstrating the bug
Created attachment 98503 [details] screenshot of xls rendered in LS
Created attachment 98504 [details] screenshot of xls rendered in MS Office
I attached the XLS file and screenshots of it rendered in Libre Office and MS Office. (No offense taken, but the first message was already saying that the result observed was different from MS Excel.)
(In reply to comment #0) > Consider the following cell format : [<0.05][BLUE]"small";[<0]"negative";@ > it should print "small" for numbers between 0 and 0.05, "negative" for > negative numbers and treat all other data as text. I am not convinced that "treat all other data as text" is an accurate representation. Formats should be respected. LO Calc Number Format Codes page: https://help.libreoffice.org/Common/Number_Format_Codes#Including_Text_in_Number_Format_Codes > To include text in a number format that is applied to a cell that might > contain text, enclose the text by double quotation marks (" "), and then > add an at sign (@). For example, enter "Total for "@ to display "Total > for December". MS Excel Number Format Codes page: http://office.microsoft.com/en-001/excel-help/number-format-codes-HP005198679.aspx > If included, a text section is always the last section in the number format. > Include an at sign (@) in the section where you want to display any text > entered in the cell. If the @ character is omitted from the text section, > text you enter will not be displayed. If you want to always display specific > text characters with the entered text, enclose the additional text in double > quotation marks (" "). For example, "gross receipts for "@ Sounds to me like @ should only be displaying content under either Calc or Excel if it is text. For numbers (e.g., the 42 in the example) either # or 0 would appear to be required. This is going to need a developer to determine.
Created attachment 113630 [details] printscreen Look at the printscreen from excel 2010- cell format is recognized differently from excel2003. I propose to close bug as invalid.
I asked Eike Rathke about this and he said this can indeed be closed as invalid, so I'm doing it.