3
類
我試圖parseInt函數,但我真的不知道在哪裏把它的代碼在正確的地方:getRange:無法轉換楠
下面的代碼:
function projectTime(QuelProjet) {
var tabUsers = getUsersList();
var ss = SpreadsheetApp.getActive();
var ProjectSheet = ss.getSheetByName("Liste Projets");
for (i = 1; i < 13; i++) {
//Nombre de jours du mois
var date = new Date(i + "/01/" + year);
var numProjects = getProjectNumber();
var currentMonthSheet = getSheetByMonth(tabMonth[i - 1]);
for (l = 0; l < tabUsers.length; l++) {
var firstLine = 1 + (l + 1) * 10 - 10 + (l + 1) * numProjects - numProjects;
Logger.log("Fline " + l + " : " + firstLine);
var QuelPro = parseInt(QuelProjet);
Logger.log("Quelpro : " + QuelPro);
var nbDays = getNbJours(date);
var sommeproject = 0;
var som1 = new Array(1000);
for (k = 1; k < nbDays + 1; k++) {
var Row = parseInt(firstLine + QuelPro);
Logger.log("Row : " + Row + " QuelProjet : " + QuelPro);
var Column = k + 1;
Logger.log("Column : " + Column);
var range = currentMonthSheet.getRange(Row, Column);
som1[k] = range.getValues();
//sommeproject = sommeproject + currentMonthSheet.getRange(firstLine + QuelProjet, k + 1).getValues();
}
}
}
var sommeproject = 1;
sommeproject = sommeproject + som1;
return sommeproject;
}
的問題是,在這條線:
var range = currentMonthSheet.getRange(Row, Column);
QuelProjet的是,我把喜歡的一個整數FUNC一個說法重刑*當我把它在電子表格中
感謝您的時間
什麼呢'getProjectNumber() '回來? – Jonathon