Contact

FILENAME in Calligra Sheets: Display the Current Workbook Filename

Information Intermediate Calligra Sheets

Learn Calligra Sheets FILENAME with exact arguments, reproducible inputs, independently checked results and implementation-specific cautions.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer

FILENAME() returns the document’s filename string. It can label an internal report with its workbook identity, but it is not a version identifier or proof that the workbook’s contents have been saved.

Syntax and source behavior

=FILENAME()

There are no arguments. The registration explicitly sets a zero-argument count, and the function returns the calculation settings’ fileName() string. The KDE handbook entry says an unsaved document returns an empty string.

The exact path/basename/URL presentation depends on how the document setting is populated in the application and file workflow. The saved-document example below shows the actual file URL returned in the tested build; it is not a universal basename or path format.

Reproduce an unsaved-document check

  1. Create a new blank workbook that has never been saved.
  2. In B2 enter =FILENAME().
  3. The handbook-derived expectation is an empty string, which can look like a blank cell even though B2 contains a formula.
  4. In C2 enter =LEN(B2). Expected: 0, if B2 returned that empty string.

These are documentation-derived expectations, not native observations. They do not say the formula cell itself is empty: it contains a function whose result is empty text. A file opened from a temporary import location is not equivalent to a genuinely new unsaved document.

Practical example: label a saved report

Save a disposable workbook under a recognizable name, such as quarterly-check.ods, using a location you control. Recalculate the sheet and inspect =FILENAME(). Record the exact output before making assumptions about whether it includes directories or a URL prefix.

An internal header can use:

="Workbook: "&FILENAME()

Its output is Workbook: followed by the current returned string. This is a deterministic composition rule, not a promise of an environment-independent path. If you rename the file or save a copy, recheck after recalculation; a cached display may not establish that the metadata updated.

For an unsaved warning, use:

=IF(FILENAME()="";"Save this workbook";"Workbook name available")

The expected branch for the unsaved handbook case is Save this workbook. A nonempty result only says a name is available. It does not confirm that edits since the last save have been written to disk.

Limitations and privacy

  • Do not pass a cell reference or path argument; this function queries the current document.
  • A filename can reveal a username, directory structure or sensitive project name. Inspect the string before sharing or exporting a report containing it.
  • A filename is not a unique content hash, revision number or audit trail. Two different copies can have the same base name.
  • A returned string is not a reference that opens the workbook. It is text.
  • Unsaved, imported, temporary and remotely opened documents may differ in how their document settings are populated; native checks are needed for each workflow.

Compatibility

Other spreadsheets may expose file identity through a different function or information selector. Do not substitute a formula without checking its returned format and save-state behavior. The Calligra implementation and handbook establish this function’s purpose, and the native example below demonstrates the exact file-URL presentation in the tested environment.

Availability and verification

  • Release checked: Calligra Sheets 26.08.2, using KDE’s release source package and release information, inspected on October 18, 2026. Relevant locations: sheets/functions/information.cpp lines 65–67 and 384–387; sheets/functions/information.xml FILENAME help.
  • Introduced: The original introduction version is not established by these sources. Current registration establishes presence in 26.08.2, not the first release.
  • Lifecycle: Registered in the inspected release; no retirement or deprecation marker was found in this function’s registration. Retirement (removed support) and deprecation (discouraged but retained support) are different claims; neither is asserted here.
  • Native testing: Selected cases were observed in Calligra Sheets 25.04.2, as detailed below. The source discussion concerns 26.08.2; unlisted cases remain source-derived or independently calculated.

Selected native results and screenshot

The following results were observed in Calligra Sheets 25.04.2 using an ODS workbook opened, calculated and saved by the application. The formula text below uses worksheet notation; saved ODF reference brackets are omitted for readability. Unlisted examples and edge cases retain their separate source or mathematical evidence.

Native formula Observed display
=FILENAME() file:///tmp/Calligra-Function-Examples.ods

For this check the demonstration document was saved at a generic temporary location. The observed result is a file URL, including file:///, rather than just a basename. This checks the saved-document case only; the unsaved-document expectation above was not tested here.

Calligra Sheets 25.04.2 FILENAME worksheet with F2 selected and its formula bar visible

Screenshot: Native 25.04.2 capture with F2 selected. The formula bar shows =FILENAME(); column F contains application results.