function QuestionImport() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var hoja = ss.getSheets(); var Pregunta = query(IMPORTRANGE("Here my Spreadsheet key";"Unid1T1!B2")) var actualizar = hoja.getRange("C2").setValue(Pregunta);};
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/a4a673dd-5e5c-4f9c-8f3c-2075cf4fdaa2%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/9c94d849-1c23-4831-b2df-6b9c6483365fo%40googlegroups.com.
function ImportPregunta() {let master = SpreadsheetApp.getSpreadsheetById("-------This part is the ID of the MasterControl file-----").getSheetByName("Unid1T1!B2"); // MasterControl filelet masterCell = master.getRange("B2").getValue(); // MasterControl filelet receiver = SpreadsheetApp.getActiveSpreadsheet();receiver.getRange("C2").setValue(masterCell); // Review file};
function ImportPregunta() {let master = SpreadsheetApp.getSpreadsheetById("-------This part is the ID of the MasterControl file-----").getSheetByName("Unid1T1!B2"); // MasterControl file
let masterCell = master.getRange("B2").getValue(); // MasterControl filelet receiver = SpreadsheetApp.getActiveSpreadsheet();
receiver.getRange("C2").setValue(masterCell); // Review file};
I want to include an image to strengthen something
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/5375cdb5-d9df-4b17-b9e8-0d00ffdb1c81o%40googlegroups.com.
The second part is more understandable, however you have those arguments that I do not see where to get
var result = Utils.gvizQuery
"<YOUR_SPREADSHEET_ID>",
"<YOUR_QUERY_STRING>",???
<SHEET_ID_IF_NEEDED>, // ??? can be a number (the sheetId), or the name of the sheet; if not needed, but headers are, pass in undefined
<RANGE>, // specify range, ex: `A2:O`
<HEADER_ROW_INDEX_IF_NEEDED> // ??? always a numbe
);
The first worst part is not understandableI do not know what to do....
function queryCBS(sernum) { var sernoin = sernum; if (!sernoin.trim()) {{var sernoin = "-------This part, I put the ID of the MasterControl file-----"};} else {{var serno = sernoin} var qUser = "Unid1T1!B2" + serno + "'";//You can select any three columns you want to be in the result var result = Utils.gvizQuery( "-------This part I put the ID of the Receiver file-----", qUser, "Devices", "C2");//If you change the query above, you may also need to change this range. Remember to edit the column headers, if you do. } Logger.log([serno, result]); // Logging both incoming serial and result to console. Can be disabled. return [result]; }
function queryCBS(sernum) { var sernoin = sernum; if (!sernoin.trim()) {{var sernoin = "-------This part, I put the ID of the MasterControl file-----"};} else {{var serno = sernoin} var qUser = "Unid1T1!B2" + serno + "'";//You can select any three columns you want to be in the result var result = Utils.gvizQuery( "-------This part I put the ID of the Receiver file-----", qUser, "Devices", "C2");//If you change the query above, you may also need to change this range. Remember to edit the column headers, if you do. } Logger.log([serno, result]); // Logging both incoming serial and result to console. Can be disabled. return [result]; }
function queryCBS(sernum) { var sernoin = sernum; //This is just changing the incoming variable 'sernum' to be called 'sernoin' (serial number incoming) if (!sernoin.trim()) {{var sernoin = "No serial"};} //If there is no incoming value, set sernoin to be "No serial" else {{var serno = sernoin} //This is just again a new rename of the incoming variable 'sernoin' to 'serno' var qUser = "select B,A,D where B contains '" + serno + "'";//THIS IS THE QUERY!!! YOU HAVE TO HAVE A REAL QUERY HERE!!! var result = Utils.gvizQuery( "Replace with fileID of your CB_Activity spreadsheet", //THIS IS THE FILE ID OF THE SOURCE DATA! qUser,//This is the query from above as a variable, Do not change "Devices",//This is the name of the Sheet "A2:D");//This is the range of the source data, needs to contain all values in the query
} Logger.log([serno, result]); // Logging both incoming serial and result to console. Can be disabled. return [result]; }