Bug 126577 - Fill Cells Series #NUM!
Summary: Fill Cells Series #NUM!
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6 all versions
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.4.0 target:7.2.0 target:7.4.0
Keywords:
: 77929 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-07-28 15:49 UTC by Poe
Modified: 2022-02-10 14:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Poe 2019-07-28 15:49:26 UTC
Description:
I understand this is not exactly a bug, but this is something that is wrong, mistakenly programmed or not taken on account.

When using the "Fill Cells" option to complete a certain series of numbers you are obliged to select the exact amount of cells you want to be filled in. I'm using the following option: 

Sheet -> Fill Cells -> Series, Direction "down" and type "linear". I choose the initial value of 0, the final value of 3.1416, increment of 0.0001.
 
What this does is to fill only the cells I have selected before going to the Sheet menu. 

For example:
-. If I have selected only one cell, the menu Sheet -> Fill Cells -> Series is disabled. 
-. If I choose for example three cells, and do the above procedure, only those three cells are completed. 
-. If I select the entire column, the serie is completed untill the final value, but the subsequent cells are filled with "#NUM!". 

I understand the first two cases, they make sense in some way, but the last one is absolutely useless. You can't even go to the last value. Why would someone want to fill more than a million cells with "#NUM!"? 

If you only have a few values, or even some hundreds, you can do it by hand, just writting the first two values and then grabbing the black square on the corner of the cell. But if you have thousands of values to be filled in, it takes a lot of time. If you have to manually select all of them to this tool to work, then, this is useless.





Steps to Reproduce:
1. Select an entire column or more cells than the ones that want to be filled (for example, select 15 cells in a column).
2. Go to Sheet -> Fill Cells -> Series.
3. Select the options "Down" and "Linear".
4. Complete the initial, final and increment values. For example 1, 10 and 1, respectively.
5. Then click the accept button.


Actual Results:
If the above steps have been followed, the result will be: 
-. Ten cells filled with the values from 1 to 10.
-. Five cells have the value "#NUM!".

If more cells were selected, then more of them will have the value "#NUM!". If less cells than the final value were selected, then only those selected will have been filled (not having reached the expected final value).

Expected Results:
Only ten cells filled with the values from 1 to 10.
The rest of the cells have to be left empty.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Poe 2019-07-28 15:50:05 UTC
Hope you see this. Thank you for your time.
Comment 2 Roman Kuznetsov 2019-07-28 18:41:32 UTC
I can confirm this behaviour for entire column, but I'm not sure it's a bug.

Mike, Eike what do you think?
Comment 3 Eike Rathke 2019-07-31 19:00:29 UTC
Not filling the remaining excess cells sounds sensible to me. Fwiw, that's also what Gnumeric does.

Seems the current behaviour crept in with

commit f61cbce529d039bb0e208e81cf66974cc4428420
CommitDate: Wed Apr 11 22:03:25 2012 +0200

    make ScTable::FillSeries work correctly with hidden rows/columns
Comment 4 Commit Notification 2019-09-05 21:19:25 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/de146784684789174616108817f5c9df7c000e81%5E%21

Resolves: tdf#126577 stop filling a series when threshold is reached

It will be available in 6.4.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 5 Eike Rathke 2019-10-22 16:08:26 UTC
*** Bug 77929 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2021-01-27 17:10:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/14ed118dc22513bf991ac3ff411492097bc857e2

tdf#126577: sc: Add UItest

It will be available in 7.2.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 7 Commit Notification 2022-02-10 14:44:14 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/587e3e27171d66470f7216e36ed2967c2a8b3867

tdf#126577: sc: move UItest to CppUnittest

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