I have a folder in Google Drive id=0B9TZEwAceBn6flc5Z3RncmFZZkgtQy1sZUNKMHdkMHdiMEkxOVVkT3hYajBZNEYwbzlRUVk. this folder have 163 files(162 XLS + 1 JSON ). I am trying to access this folder with Advanced Google Services Drive (https://developers.google.com/apps-script/advanced/drive) and get count 263.
My app Script Code
var count=0;
var itemsIndex=0;
var quotaLength=0;
var items=[]
function convertExcelToGoogleSpreedSheet() {
var folderId = '0B9TZEwAceBn6flc5Z3RncmFZZkgtQy1sZUNKMHdkMHdiMEkxOVVkT3hYajBZNEYwbzlRUVk'
Logger.log(folderId)
var pageToken
do{
Logger.log("Inside while Loop")
files = Drive.Children.list(folderId,{pageToken:pageToken}); //have limit of 100 files in one time.
pageToken = files.nextPageToken;
Logger.log('item length'+files.items.length)
items=items.concat(files.items)
}while(files.nextPageToken)
Logger.log(items.length)
// convertFile(itemsIndex,items);
Logger.log("Count="+count)
}
Log output
[15-02-20 08:04:22:287 IST] Inside while Loop
[15-02-20 08:04:22:645 IST] item length100
[15-02-20 08:04:22:645 IST] Inside while Loop
[15-02-20 08:04:22:964 IST] item length100
[15-02-20 08:04:22:965 IST] Inside while Loop
[15-02-20 08:04:23:287 IST] item length63
[15-02-20 08:04:23:287 IST] Total Count=263
I am trying to convert these XLS file to Google Spreed sheet for creating data for my website http://bnifsc.in