Bug 156814 - Imported solver models should not display the sheet name when they're in the same sheet
Summary: Imported solver models should not display the sheet name when they're in the ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.2 rc
Hardware: All All
: low minor
Assignee: Rafael Lima
URL:
Whiteboard: target:24.8.0
Keywords: filter:xlsx
Depends on:
Blocks: Solver
  Show dependency treegraph
 
Reported: 2023-08-18 17:27 UTC by Rafael Lima
Modified: 2024-03-12 14:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing the problem (56.14 KB, image/png)
2023-08-18 17:36 UTC, Rafael Lima
Details
XLSX file with the solver models (17.70 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-08-18 17:37 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-08-18 17:27:53 UTC
When you create a solver model in Excel and import it into Calc, the sheet names are used to display the addresses even when the model belongs to the shame sheet. 

For instance, see the attached image. The solver model belongs to a sheet named "Transporte" and the imported model in Tools - Solver dialog shows range addresses as $Transporte.$J$18 i.e. starting with the sheet name.

This is not necessary since the model is in a sheet with the same name. Moreover, models created within LO Calc won't add this unnecessary sheet name.

So in summary, for a sheet containing a solver model, all addresses referring to the same sheet should not display the sheet name as prefix.

This happens in LO 7.6+
Comment 1 Rafael Lima 2023-08-18 17:36:08 UTC
Created attachment 189032 [details]
Screenshot showing the problem
Comment 2 Rafael Lima 2023-08-18 17:37:29 UTC
Created attachment 189033 [details]
XLSX file with the solver models

This file has 4 tabs, each with its own solver model.

The screenshot was taken from the "Transporte" sheet, but it happens in any sheet.
Comment 3 Buovjaga 2023-09-20 16:58:00 UTC
Confirmed

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 43df1237a091e2b0f4495d5a7e959f7beaab025d
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 13 September 2023
Comment 4 Rafael Lima 2024-03-09 16:05:52 UTC
Fun fact: while fixing this bug I found out that in MS Excel, the solver dialog does not allow to use ranges from other sheets. Calc does allow that, which is totally fine.
Comment 5 Rafael Lima 2024-03-09 16:06:21 UTC
Proposed patch:
https://gerrit.libreoffice.org/c/core/+/164610
Comment 6 Commit Notification 2024-03-12 14:37:22 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d3049ab4786005c6bd17c66f8edcb98210bf511c

tdf#156814 Remove sheet name if range belongs to the same sheet (Solver)

It will be available in 24.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.