Doc Information in Calc

Hello All ,

I have a question / issue that is bothering me for a long time .
I am using LibreOffice on a daily basis , ( Writer and Calc ) for years now and generally speaking , it is really awesome .

-One of the features that I use as default in all of my writer documents is the document statistics in writer ( e.g. Last printed, Last saved and more importantly - Revision No. ) - which is a great help with version Control - but I can not seem to find it on Calc - and Honestly , I searched everywhere - so either i am missing something obvious , or it really is missing from Calc .

The only place I found something remotely similar is in the “headers and footers” function, But I can not seem to find where to put the available info into a cell , in a similar manner as in Writer ->Insert->Fields → More Fields … that would simply put the auto-updating field in the document body ( or in a cell in calc ) …

This info is obviously available to the software ( on coding level - see File → Properties which is basically DocInformation ) - but i can not find where it is exposed on the UI for the user ( I would attach a screenshot of desired info - but I do not have enough points to do so ) .

SO - what am I missing here ? How can I get this basic info into a cell ? Is there a function / formula / operator that I can use ?

Are you speaking of the menu File Versions... options?

@EasyTrieve - Thank for the reply - No , Probably not ( I don’t even know what is that ) . I am speaking of the info you would find in File->Properties->General tab . There you would find some properties, like last printed, last modified, revision no. , filename location etc… - those properties are available in Calc under Insert->Fields->More Fields .. - among many others like page no. total pages , owner etc etc … In calc you can see SOME of them in Headers and Footers

@krembo99: If you post a question in more than one forum, please link ther requests. Otherwise helpers not knowing of the gemini may waste their time.
See: DocInformation (statistics) - Insert Fields (View topic) • Apache OpenOffice Community Forum

Not sure of the answer to this, but I recall someone else asking about a similar property, and the answer being that it had to do with LO version. I think the newer version left out something like last name. So which version of LO are you using? You might try some other versions to see if that makes any difference.

@Lupp - sorry for the “gemini” posting ( I already tried to explain my rational of two products in the other Aoo forum to the exact same remark from a same name user - presumely you :slight_smile: )

Of course, a tool similar to the ‘Insert’>‘Field’ might be added to Clac. As long as this is not done in the course of development the only way I can see is to program a custom routine.

You may start with something like

REM  *****  BASIC  *****

Function docInfo(pChoice As String)
theDoc   = ThisComponent
theProps = theDoc.DocumentProperties
Select Case pChoice
    Case "Author"          : docInfo = theProps.Author
    Case "Title"           : docInfo = theDoc.Title
    Case "CreationDate"    : docInfo = hDTstamp(theProps.CreationDate)
    Case "ModificationDate": docInfo = hDTstamp(theProps.ModificationDate)
    Case "PrintDate"       : docInfo = hdTstamp(theProps.PrintDate)
    Case "RevisionNumber"  : docInfo = theProps.EditingCycles
End Select 
End Function

Function hDTstamp(propD As Object)
If propD.Year=0 Then 
    hDTstamp = "NotYetSet"
    hDTstamp = Date(propD.Year, propD.Month, propD.Day) +_
                propD.NanoSeconds*1E-9 +_
                propD.Seconds) /60 +_
                propD.minutes) /60 +_
                propD.Hours)   /24 
End If
End Function

@ Lupp - Thanks, this looks really great ( and simple ) , And is a great help . I was hoping to void coding , but it seems that this is the only way, so as soon as I will find time - I will dust my python console and give it a try as a simple menu-driven extension … Thanks again !

I well know that the LibreOffice BASIC and its IDE are poor and often bashed. However that’s the native programming tool coming with the software. I would estimate it the one with the highest certainty to be kept up-to-date. The simple case under discussion here should not require a powerful toolbox.
BTW: If you want a dialog-controled solution, don’t omit the function(s). It can be called from your dialog and from Calc cells as well. (Not applicable in case of Object parameters, of course.)


AFAIK you only have Right ClickInsert FieldDate (or Sheet Name or Document Title) when editing a cell in situ: select the cell, Double Click (or F2)▸Right Click.

See 3.6 release notes

This could be an interesting request for enhancement. It should be checked that it has not already been done


Thanks, I did not noticed this , and it is really comfortable . I just wonder why the other ( even more important fields for versioning ) are missing , like revision number, last modified , and last printed …