I have a problem with GAS when I try to put an image into a spreadsheet. If I add the image from spreadsheet by menu: Insert -> Image -> from Google Drive, I view my image in Spreadsheet and when I print it I can view the image in print preview and in the paper printed. Instead if I add the images from GAS, I view the image in the spreadsheet like the first image, but when I try to print the spreadsheet, in the print preview I view only one image, the first created by "menu" and not the second created by script. So, if I try to print, the result paper is the same: only one image, only the first created by "menu".
The GAS code I used to insert the image is this:
var spScheda = SpreadsheetApp.openById(ID_SPREADSHEET_IN_DRIVE);
var schedaSheet1 = spScheda.getSheetByName("Sheet1");
var imgFile = DriveApp.getFileById(ID_JPG_IN_DRIVE);
var blobJPG = imgFile.getBlob();
schedaSheet1.insertImage(blobJPG, 3, 122);
SpreadsheetApp.flush();
Or with the Thumbnail:
var spScheda = SpreadsheetApp.openById(ID_SPREADSHEET_IN_DRIVE);
var schedaSheet1 = spScheda.getSheetByName("Foglio1");
var imgFile = DriveApp.getFileById(ID_JPG_IN_DRIVE);
var blobThumbnail = imgFile.getThumbnail();
schedaSheet1.insertImage(blobThumbnail, 3, 122);
SpreadsheetApp.flush();
Can anyone help me?
Regards, Laura