Hello All ,
I have a question / issue that is bothering me for a long time . I am using OpenOffice 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 ( attached a screenshot of desired info sample ) .
I even searched the function list where the only remotely similar function is INFO() that as far as I can tell, returns environment variables ( Os ,Version, Release ) - but nothing for the Spreadsheet or document itself ..
SO - what am I missing here ? How to get this info into a cell ?
DocInformation (statistics) - Insert Fields
Re: DocInformation ( statistics ) - Insert Fields
While I was unable to find the information you are asking about, I suspect that it may be available via a hand-written macro (opposed to one that was created using the Macro recorder)
A quick look at the documentation I was able to find on Basic macros at http://pitonyak.org/AndrewMacro.pdf and http://www.pitonyak.org/OOME_3_0.pdf did not allow me to quickly find the information.
You may want to review those sources, as well as searching for others regarding macros for Open Office, as I may have missed it or it may be in a source I didn't check.
Additionally, Open Office also allows macros to be written in Python, BeanShell and Javascript. I have no knowledge regarding these other languages, and even my knowledge of Basic is, what I would call, rudimentary, at best.
There are several other helpers on this forum that have far superior macro knowledge.
A quick look at the documentation I was able to find on Basic macros at http://pitonyak.org/AndrewMacro.pdf and http://www.pitonyak.org/OOME_3_0.pdf did not allow me to quickly find the information.
You may want to review those sources, as well as searching for others regarding macros for Open Office, as I may have missed it or it may be in a source I didn't check.
Additionally, Open Office also allows macros to be written in Python, BeanShell and Javascript. I have no knowledge regarding these other languages, and even my knowledge of Basic is, what I would call, rudimentary, at best.
There are several other helpers on this forum that have far superior macro knowledge.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Re: DocInformation ( statistics ) - Insert Fields
CELL("FILENAME") returns a string from which you can extract the file name. I see that you sample file is from Excel. IIRC, the CELL() function works slightly differently in Excel, so I am not sure that this approach will work for your files.
For the other fields you marked I do not know, but I would look into what RusselB suggests.
For the other fields you marked I do not know, but I would look into what RusselB suggests.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
Re: DocInformation ( statistics ) - Insert Fields
It may be relevant that OP is possibly using LibreOffice, as the same question has been posted at AskLibreOffice
Slackware 15 64 bit
Apache OpenOffice 4.1.16
LibreOffice 25.8.3.2; SlackBuild for 25.8.3 by Eric Hameleers
---------------
Tech support [noun]: A person who does precision guesswork based on unreliable data provided by those of questionable knowledge.
Apache OpenOffice 4.1.16
LibreOffice 25.8.3.2; SlackBuild for 25.8.3 by Eric Hameleers
---------------
Tech support [noun]: A person who does precision guesswork based on unreliable data provided by those of questionable knowledge.
Re: DocInformation ( statistics ) - Insert Fields
@krembo99: If you post a question in more than one forum, please link these requests. Otherwise helpers not knowing of the gemini may waste their time.
See: https://ask.libreoffice.org/en/question ... n-in-calc/
Please also regard the hint by "robleyd" and create/update your profile.
See: https://ask.libreoffice.org/en/question ... n-in-calc/
Please also regard the hint by "robleyd" and create/update your profile.
On Windows 10: LibreOffice 25.2.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
Re: DocInformation ( statistics ) - Insert Fields
There is a perl script here http://books.evc-cit.info/books/oobook/ ... pl-example to extract OO document statistics. It may get you started on a solution.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
Re: DocInformation ( statistics ) - Insert Fields
Thanks all for the answers - This forum always has great people who really try ( and mostly succeed ) to help .
I hope to find a way to do that , which I have a feeling is possible, even not documented .
In the meantime , if anyone stumbles on more info , please do post - it would be a great help .
)
@RusellB &@RoryOF- these are really great resources .
C++ or C seems a bit overkill for this task , and My Python is a bit rusty , But for a simple task like that I think I can manage, with the help of your examples, to hack something and write my own extension. I still think though that it is something that should be implemented into core .
I will try to post the code as soon as I will get something working . ( If core will not implement before me
)
At my work, all the computers are with AOO, and all my private machines have both AOO and LibreOffice as portables.
I do acknowledge that the difference between LibreOffice and Aoo is not the on the same magnitude as , for example, Aoo and MS Excel , but still - posting the same question on 2 different products seems to be the right way to find the right tool for a certain task , and the current structure dictates that ( unfortunately , IMHO ) - these two products has two different support forums ..
I am sorry if that "gemini" as you call it ( or simply sibling ) has offended someone or hit rivalry nerve - that was simply not my intention .
I hope to find a way to do that , which I have a feeling is possible, even not documented .
In the meantime , if anyone stumbles on more info , please do post - it would be a great help .
@keme - Thanks, that is a great help , I will explore other possible arguments and functions, It might well be that a hidden or undocumented one is what I am looking for . ( My File BTW was just a "save as.." product . I do not even have excel , or any MS office products installed , Not do I want anykeme wrote: CELL("FILENAME") returns a string from which you can extract the file name...
@RusellB &@RoryOF- these are really great resources .
C++ or C seems a bit overkill for this task , and My Python is a bit rusty , But for a simple task like that I think I can manage, with the help of your examples, to hack something and write my own extension. I still think though that it is something that should be implemented into core .
I will try to post the code as soon as I will get something working . ( If core will not implement before me
@robleyd - Actually, I am using both. LibreOffice 5.1.3.2 on Win7 and AOO 4.1.x ( not sure ) on UBUNTU.robleyd wrote:It may be relevant that OP is possibly using LibreOffice, as the same question has been posted at AskLibreOffice
At my work, all the computers are with AOO, and all my private machines have both AOO and LibreOffice as portables.
@Lupp Well, I was under the impression that LibreOffice and Aoo are , as for now , separated products with ( albeit minor ) different sets of capabilities and UI access tools - and more importantly , different code repositories and development tree . For that reason, it is not so crazy ( although might be wrong ) to assume that a function or feature WILL be available in one , but not the other , and that not all questions that are relevant to one, would necessarily be relevant to another .Lupp wrote:@krembo99: If you post a question in more than one forum, please link these requests. Otherwise helpers not knowing of the gemini may waste their time.
I do acknowledge that the difference between LibreOffice and Aoo is not the on the same magnitude as , for example, Aoo and MS Excel , but still - posting the same question on 2 different products seems to be the right way to find the right tool for a certain task , and the current structure dictates that ( unfortunately , IMHO ) - these two products has two different support forums ..
I am sorry if that "gemini" as you call it ( or simply sibling ) has offended someone or hit rivalry nerve - that was simply not my intention .
Last edited by krembo99 on Sat May 06, 2017 9:26 am, edited 2 times in total.
Re: DocInformation (statistics) - Insert Fields
You should search for "OpenOffice metadata"; I have seen some macros to add and retrieve metadata of one's choice to OO files; with a little thought and modification these might suit your purpose.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
Re: DocInformation (statistics) - Insert Fields
I tried an answer in the other thread: https://ask.libreoffice.org/en/question ... n-in-calc/ .
The preliminary BASIC code posted there would also work in AOO.
The preliminary BASIC code posted there would also work in AOO.
On Windows 10: LibreOffice 25.2.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München