Skip to content
Sheetwrite

@sheetwrite/core/external-links

changeExternalLinkSourcefunction

Report a problem

On this page

Point the link of book at another workbook. This is Excel's "Change Source": formulas that name book name next.book, and the link keeps its saved values until the next update. One undoable change. Returns whether the document applied it.

Declaration

function changeExternalLinkSource(
grid: Grid,
book: string,
next: {
readonly book: string;
readonly target: string;
},
): boolean

Parameters

grid: Gridrequired

The grid whose workbook holds the link.

book: stringrequired

Name of the linked workbook to change; case is ignored.

next: { readonly book: string; readonly target: string; }required

The new workbook's name, as formulas write it, and its location.

Returns

boolean

false when no link has that name or the document refused the change.