"Remove Link" in Numbers...

Hi MSF Members,

I’m wondering if yet another script is feasible with AppleScript. Here’s the story:

I’m sitting here working on a Numbers document, and realized I needed to remove the links, on many, many cells. Rather than sit here all day and double-click each cell, highlight the text, go to the “Format” menu, and click “Remove Link;” is there a way to expedite this using AppleScript?

Thank you.

Select at least a cell in the table then run this script.

# Grab the identifiers of the taget table
set {theDocument, theSheet, theTable, upperRow, leftColumn, lowerRow, rightColumn} to my get_SelParams()
tell application "Numbers" to tell document theDocument to tell sheet theSheet to tell table theTable
	repeat with r from 1 to count rows
		repeat with c from 1 to count columns
			tell cell r of column c
				if its formula is missing value then set its value to its value
			end tell
		end repeat
	end repeat
end tell


# Version pour Numbers 3.2.x
on get_SelParams()
		tell application "Numbers"
			set t to front document's active sheet's first table whose selection range's class is range
			tell t's selection range
				tell first cell to set {firstRowNum, firstColNum} to {its row's address, its column's address}
				tell last cell to set {lastRowNum, lastColNum} to {its row's address, its column's address}
			end tell
			--return {front document's name, t's parent's name, t's name, row_Num1, col_Num1, row_Num2, col_Num2} # original version
			# It seems that at least one version of Numbers doesn't recognize the function parent so use an other way to get the name of the active sheet
			return {front document's name, name of front document's active sheet, t's name, firstRowNum, firstColNum, lastRowNum, lastColNum}
		end tell
	on error
		display dialog "Problem getting values. Did you select cells?" buttons "Cancel"
	end try
end get_SelParams

Yvan KOENIG running El Capitan 10.11.5 in French (VALLAURIS, France) dimanche 22 mai 2016 12:55:58

Thank you! I’ll give it a try!!

It works!!! Thank you so much, Yvan Koenig!