Package io.keikai.axyra.sheets.content
Record Class ExternalLink
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.content.ExternalLink
- Record Components:
index- 1-based index matching the[N]token used in formulas for this linkname- display name — the linked file's base name with the directory stripped, usually keeping the extension (e.g.Book2.xlsx); formulas match it with or without the extensionsheetNames- sheet names of the linked workbook, positional by sheetIdcachedValueCount- number of cached cell values available to the formula evaluatorrefreshErrorSheets- indices intosheetNames()whose cache was saved while the source was unreachable — references into those sheets evaluate to#REF!
public record ExternalLink(int index, String name, List<String> sheetNames, int cachedValueCount, List<Integer> refreshErrorSheets)
extends Record
An external workbook reference descriptor (immutable, read-only): a linked
workbook that formulas such as
[Book2]Sheet1!A1 or [1]Sheet1!A1
resolve against. Read back with Workbook.externalLinks().
The engine never opens the linked file — the formula evaluator serves the
cell values cached in xl/externalLinks/externalLink{N}.xml at the
time the file was last saved by Excel. The link parts round-trip byte-exact
on save; re-pointing or removing a link is not supported through this API.
Reference: ECMA-376 Part 1 §18.14 (external references).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecachedValueCountrecord component.final booleanIndicates whether some other object is "equal to" this one.static ExternalLinkBuild anExternalLinkfrom one decoded FFI JSON object.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.name()Returns the value of thenamerecord component.Returns the value of therefreshErrorSheetsrecord component.Returns the value of thesheetNamesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExternalLink
public ExternalLink(int index, String name, List<String> sheetNames, int cachedValueCount, List<Integer> refreshErrorSheets) Creates an instance of aExternalLinkrecord class.- Parameters:
index- the value for theindexrecord componentname- the value for thenamerecord componentsheetNames- the value for thesheetNamesrecord componentcachedValueCount- the value for thecachedValueCountrecord componentrefreshErrorSheets- the value for therefreshErrorSheetsrecord component
-
-
Method Details
-
fromMap
Build anExternalLinkfrom one decoded FFI JSON object. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
sheetNames
Returns the value of thesheetNamesrecord component.- Returns:
- the value of the
sheetNamesrecord component
-
cachedValueCount
public int cachedValueCount()Returns the value of thecachedValueCountrecord component.- Returns:
- the value of the
cachedValueCountrecord component
-
refreshErrorSheets
Returns the value of therefreshErrorSheetsrecord component.- Returns:
- the value of the
refreshErrorSheetsrecord component
-