Ask Your Question
0

Named Range and print

asked 2018-12-22 21:50:11 +0200

abrj gravatar image

updated 2018-12-23 08:21:14 +0200

In Excel I can assign the code below as a Named Range to define a dynamic print area, and then assign the Named Range under Print Range.

If I try to do the same in LibreOffice Calc it doesn't work; I can't see the Named Range when I choose Choose Format - Print Ranges - Edit.

Anyone that have any Idea what to do?

The code is

OFFSET($Sheet2.$A$1;0;0;(COUNT($Sheet2.$D:$D)+1);4)
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2018-12-23 19:50:07 +0200

Hello @abrj

Looks like it is currently not possible to use Named Range, which is defined using formula expression, as a predefined Print Range. Have tested several different formulas returning cell or cell ranges - no success. Please see this topic and this enhancement request. So no changes from year 2011...

edit flag offensive delete link more
0

answered 2018-12-23 21:55:06 +0200

Lupp gravatar image

If you define a named range and select the checkbox Print range under Range option , you will get offered this named range when editing print ranges.
However, a named range based on a calculated reference (like with OFFSET) is not offered as a print range then, though the setting is not rejected, and the range itself is defined and functional. At least "not rejected" I would judge to be a bug. You may file this inconsistency as a bug or your hoped-for dynamic print area as an enhancement to https://bugs.documentfoundation.org.
Without waiting for a new feature you can write user code for the functionality. Each sheet has the properties
.PrintAreas (Array of CellRangeAddress)
.PrintTitleColumns (Boolean) and .TitleColumns (CellRangeASddress)
.PrintTitleRows (Boolean) and .TitleRows (CellRangeAddress)
and you can set the respective Boolean values and CellRangeAddress_es from a Sub or a Function in Basic e.g..

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-12-22 21:50:11 +0200

Seen: 136 times

Last updated: Dec 23 '18