Bug 132104 - Calc lacks several fields available in Writer
Summary: Calc lacks several fields available in Writer
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2020-04-14 18:57 UTC by Lenge
Modified: 2020-04-24 15:37 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 Lenge 2020-04-14 18:57:28 UTC
Description:
Writer offers far more fields under "Insert\Field" than Calc does.
For example, you can easily insert the document's last modification date and time as fields in Writer, and these fields will automatically update themselves each time the document is saved:

Insert\Field\More Fields...
Tab: "DocInformation"
Type: Modified
Select: Time, Date

While such a functionality is very useful and comfortable, there is no equivalent in Calc, neither as fields nor as spreadsheet functions.

I'd generally suggest to offer ALL applicable fields for ALL apps and ALL document types (unless a certain field doesn't make sense for a certain document type).

Steps to Reproduce:
1. Run Calc
2. While editing a cell value, click "Insert\Field"

Actual Results:
As of Calc 6.4.2, only "Date", "Sheet Name", and "Document Title" are available.

Expected Results:
I'd love to have as much as Writer's field as make sense; especially the document's last modification date and time.


Reproducible: Always


User Profile Reset: No



Additional Info:
Maybe Calc could/should also offer the information via spreadsheet functions (in addition to fields)?
Comment 1 Roman Kuznetsov 2020-04-14 20:18:45 UTC
Agree
Comment 2 Heiko Tietze 2020-04-20 13:49:21 UTC
Writer: Page number/count (not applicable), Date, Time, Title, First Author (maybe), Subject (not applicable).

Calc: Date, Sheet Name, Document Title

What variables exactly are you missing?
Comment 3 Lenge 2020-04-20 20:24:51 UTC
(In reply to Heiko Tietze from comment #2)
> What variables exactly are you missing?

1.) Page number/count: Also applicable in Calc
(as spreadsheets are printed on pages, just like any other document)

2.) Did you miss the entire "Insert\Field\More Fields..." part?
What I miss most is what I already stated in the original report:

<cite>
For example, you can easily insert the document's last modification date and time as fields in Writer, and these fields will automatically update themselves each time the document is saved:

Insert\Field\More Fields...
Tab: "DocInformation"
Type: Modified
Select: Time, Date

While such a functionality is very useful and comfortable, there is no equivalent in Calc, neither as fields nor as spreadsheet functions.
</cite>
Comment 4 Cor Nouws 2020-04-23 12:42:24 UTC
@lenge: do you know the use of the fields in Format > Page > Header/Footer > Edit
I think that is all that makes you happy :) ?

If not , pls come up with a specific example.
(Possibly there even is a ticket for more options in Editing the header/footer..)

thanks - Cor
Comment 5 Lenge 2020-04-23 13:08:04 UTC
(In reply to Cor Nouws from comment #4)
> @lenge: do you know the use of the fields in Format > Page > Header/Footer >
> Edit
> I think that is all that makes you happy :) ?

1.) Yes, I do. ;)

2.) No, it is not:
a) These fields are only available in headers/footers, not inside the spreadsheet itself. Whereas in Writer, any and all fields are available everywhere in the document, not only in headers/footers.)
b) The date and time fields seems to have a fixed format.
No format options as in  Writer's "Insert\Field\More Fields...".
c) There is no hint about what  date/time exactly is meant.
(Current date/time? Creation date/time? Last modification date/time?)

> If not , pls come up with a specific example.

Okay: How do I put the documents last modification date (that is the date that the document was last saved) in cell B2, and the last modification time in cell B3?
Comment 6 Heiko Tietze 2020-04-23 13:26:13 UTC
(In reply to Lenge from comment #5)
> Okay: How do I put the documents last modification date (that is the date
> that the document was last saved) in cell B2, and the last modification time
> in cell B3?

Is this a real use case? Makes sense to have these information somewhere but what do you calculate with it? And if so wouldn't you expect it as function like =If(LastDocModificationDate()=DayOfTheWeek("Friday/13th"),close,continue).

And page number/count is not defined unless the "infinite" spreadsheet is divided in pages depending on the chosen printer. So it's also better suited for the header/footer.
Comment 7 Lenge 2020-04-23 13:48:00 UTC
(In reply to Heiko Tietze from comment #6)
> Is this a real use case?
Yes.

> Makes sense to have these information somewhere but
> what do you calculate with it?
We primarily need it as descriptive text in group headlines/titles, subheads, or within "normal" text (all inside the spreadsheet itself, not only in page headers/footers).

Of course it would be even more flexible to use it in calculations, and because of that ...
 
> And if so wouldn't you expect it as function like
> =If(LastDocModificationDate()=DayOfTheWeek("Friday/13th"),close,continue).
... I added the corresponding "Additional Info:" to the original bug report. ;)

However, as Writer offers it as fields, I thought the straightforward approach was to just remove the corresponding restrictions in Calc.

But I'd also love to have functions like LastDocModificationDate() or LastDocModificationTime() available in Calc. :)

> And page number/count is not defined unless the "infinite" spreadsheet is
> divided in pages depending on the chosen printer. So it's also better suited
> for the header/footer.
Writes offer all fields anywhere in the document, including (but not limited to) page header and footers. I generally think that removing artificial limitations is a good idea. I a Calc user wants to use it in headers/footers, he can do it (just like in Writer, where you have the plus of free formatting).
If he wants it somewhere else, why disallow it? If a certain field is undefined under certain circumstances, it can still have "not defined" as output.
(BTW: Page boundaries can also be specified on infinite spreadsheets, which makes the numbers both defined and useful.)
Comment 8 Heiko Tietze 2020-04-24 08:19:27 UTC
Clearly described use case, implementation won't affect usability - green light from UX.

Eike, I could imagine this as a medium/difficult easyhack. Is it?
Comment 9 Mike Kaganski 2020-04-24 15:37:42 UTC
Extending INFO/CELL spreadsheet functions maybe? Without the need of additional functions.