0

I want to convert rich text cell content of my numbers table to other formats like Markdown or HTML. But how do I get more then just plain text?

Maybe there's a solution how to set the selection range and copy it as rtf to the clipboard.

tell application "Numbers"
    get formatted value of cell 2 of row 2 of table 1 of sheet 1 of document of window 1
end tell
1
  • Select the cell and then invoke copy to clipboard.
    – jweaks
    Sep 24, 2014 at 2:45

1 Answer 1

0

Here's a script to select the cell and then copy the contents to the clipboard which preserves the formatting:

tell application "Numbers"
    tell table 1 of sheet 1 of document of window 1
        activate
        set selection range to cell 2 of row "2" --range "B2:B2"
    end tell

    tell application "System Events"
        tell process "Numbers"
            keystroke "c" using command down
        end tell
    end tell
end tell
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.