Page 1 of 1

Auto Date in OpenOffice worksheet

PostPosted: Wed Jul 11, 2018 5:20 pm
by lovepatt
I am using word writer 4.5.1 and windows 10. I am looking for an auto date, like what I used in msoft word. There, in the header or footer you could use &D and the doc would update for the days date when you opened the doc. I am trying to make use of this in a cell. Anyone?

Re: Auto Date in open office worksheet

PostPosted: Wed Jul 11, 2018 6:18 pm
by RoryOF
/Insert /Fields : Date.

Re: Auto Date in open office worksheet

PostPosted: Wed Jul 11, 2018 8:24 pm
by lovepatt
Sorry, no options for insert fields date in pull down menus or icons. The closest I can come is putting a header in, but that doesn't show up on worksheet, only in print preview. Any other ideas?

Re: Auto Date in open office worksheet

PostPosted: Wed Jul 11, 2018 8:26 pm
by RoryOF
If you are working in Writer, as you said, /Insert /Fields is a menu item.

Re: Auto Date in open office worksheet

PostPosted: Wed Jul 11, 2018 8:37 pm
by Villeroy
Install https://libreoffice.org/ instead of OpenOffice or add a macro to OpenOffice. LibreOffice has a built-in shortcut command for this.

A Python macro of mine inserts the current timestamp (date+time) to the active cell: https://forum.openoffice.org/en/forum/d ... p?id=29462
Open the downloaded zip file. It contains only one file TimeStamp2Calc.py
Open the file explorer and enter %APPDATA% as folder address. From there navigate to folder OpenOffice\4\user\Scripts, add a folder named "python" and put the file TimeStamp2Calc.py into that directory.
Open any Calc document.
Tools>Customize... tab "Keyboard"
Choose a free shortcut.
In the "Category" box navigate to OpenOffice_Macros>My_Macros>TimeStamp2Calc and choose NowToActiveCell.
Click the Modify button and then OK.

Re: Auto Date in open office worksheet

PostPosted: Thu Jul 12, 2018 2:39 am
by robleyd
A picture may be worth a thousand words.
insert_fields.png
Insert | Fields in Apache OpenOffice 4.1.5 Writer


Note 1: there is no 4.5.1 version in Apache OpenOffice - you may mean LibreOffice or you may have mistyped the version number

Note 2: You should not put your question in your signature.

How to update your signature

Re: Auto Date in OpenOffice worksheet

PostPosted: Thu Jul 12, 2018 4:56 am
by keme
"Worksheet" is more frequently associated with spreadsheets than with text documents. Also "header showing only in print preview" is a strong indication that said "Word Writer Worksheet" is a spreadsheet in disguise.

If you need the current date in a spreadsheet cell (also if you embed a spreadsheet in a Writer document rather than inserting a plain table), the function =TODAY() will do. It will not show the last date the sheet was opened, but rather current date.

If you want the date in a header or footer, find the menu item Edit - Headers and footers... Place the insertion point in the pane corresponding to the desired date placement. Then click the date icon below the content panes. (The icon looks like a tearoff day calendar, a square with the number 1 in it).This one also displays current date (at print time), not the date when the file was opened.

If you must have the date when the file was opened (i.e. date not updating at midnight), it may be possible but it is not a trivial task. Please post back if such a date is required.