[Solved] =CELL("FILENAME";A1) no autoupdate

Discuss the spreadsheet application
Locked
User avatar
morphingstar
Posts: 108
Joined: Mon Mar 28, 2011 5:52 am
Location: Mx

[Solved] =CELL("FILENAME";A1) no autoupdate

Post by morphingstar »

When I change the file name using Save As the result in cell containing =CELL("FILENAME";A1) does not change.
If the cell is in EDIT and then ENTER the content does not change.
Content only changes if cell content is deleted and the formula entered again.
What is preventing correct operation - meaning show correct actual file name?
Tks.
Last edited by MrProgrammer on Sat Jun 20, 2020 4:10 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
OO 4.1.6 on Win10. Member since StarOffice 7. Alternative name "morphingstar2" when other fails. Use Writer, Calc (as DB + Calc), Draw. Impress mainly for Eyedropper and animating GIFs. Updated 20190716.
User avatar
Zizi64
Volunteer
Posts: 11505
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: =CELL("FILENAME";A1) no autoupdate

Post by Zizi64 »

Try to force the recalculation of the whole spreadsheet or only that cell. (F9, Ctrl-Shift-F9)
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Lupp
Volunteer
Posts: 3755
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: =CELL("FILENAME";A1) no autoupdate

Post by Lupp »

Did you try Ctrl+Shift+F9 (calculate all)?

CELL() is a rather obscure function. But anyway spreadsheets aren't recalculated when a SaveAs is performed.
If you want to force this, you need to create a little "macro" and to bind it to the document event 'Document has been saved as'. (Save the setting to the document.)

The macro may look like:

Code: Select all

Sub forceCalculation()
ThisComponent.CalculateAll
End Sub
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: =CELL("FILENAME";A1) no autoupdate

Post by Villeroy »

Like any other function, =CELL(x1;y1) updates whenever x1 or y1 changes either by modifying anyy of the referenced cells or by editing the formula or by reloading the document or by hitting ctrl+shift+F9
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Locked