COPYTOCLIPBOARD Function

RAMP-NL

COPYTOCLIPBOARD Function


Copy a string to the user's clipboard.

Syntax

COPYTOCLIPBOARD(sString);

Parameters

sString

Required. String that contains the data to be copied to the user's clipboard.  

Return Value

None

Examples

 

COPYTOCLIPBOARD("ABC");

 

COPYTOCLIPBOARD(MAKESUBFILEINTOSTRING("uDataGrid", true, true , "0,2,3,4,5" , "1,2,3,4,6"));

 

/* Copy to a spreadsheet */

 

var MyString = "";

var TAB_Char = "\x09" ;

var End_Of_Line_Char = "\x0D\x0A" ;

 

MyString = "Line 1 Cell 1" + TAB_Char + "Line 1 Cell 2" + End_Of_Line_Char;

MyString += "Line 2 Cell 1" + TAB_Char + "Line 2 Cell 2" + End_Of_Line_Char;

COPYTOCLIPBOARD(MyString);

  

Notes

This function can be used to allow the user to copy data to their real clipboard, for pasting into Word documents or spreadsheets