My goal is to copy a row from a spreadsheet and merge the row data using markers into a document (ideally a google presentation) that saves as a PDF that I can print.
I have figured out how to have the selected row copied into an object, but I can't for the life of me figure out how to get that text copied into any kind of temporary document. I have a presentation template with markers all ready to go.
Here is some of the scripts that I've been working with.
function printRepairs() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getValues();
var row = sheet.getActiveSelection();
//prints a comma delim string of a single row
var row1 = data[1]
Logger.log("row #1: " + row1);
var selectedRow = SpreadsheetApp.getActiveRange().getValues();
// creates a file with selected row --doesn't work.
Browser.msgBox("the row you selected contains: " +selectedRow);
DocsList.createFile('temp_row', selectedRow);
copyblob(selectedRow);
var folder = DocsList.getFolder('temp');
folder.createFile('temp_row', 'hello', 'application/vnd.google-apps.document');
doc = DocumentApp.create("sheet_test");
DocumentApp.openById("sheet_test");
text.insertText("sheet_test", selectedRow);
Browser.msgBox("the row you selected contains: " +selectedRow);
Logger.log("the row you selected contains: " + selectedRow);
}