Forum Discussion
dhirendranaga
10 years agoOccasional Contributor
Hi,
Can you please provide some sample code as how to paste code from Sys.ClipBoard to excel first sheet first cell.
Would be of great help please.
Dhirendra.
altemann
10 years agoContributor
Hey dhirendranaga!
This should work:
function InsertTextExcel()
{
var excel = Sys.OleObject("Excel.Application"); excel.DisplayAlerts = false; //No messages
var book = app.Workbooks.Open("C:\\TC\\ArquivoEXCEL"); //Path to your excel file
var sheet = book.Sheets("Plan1"); //Name of the sheet
sheet.Cells(1, 1) = Sys.Clipboard;
book.Save();
app.Quit();
}