This is what I am running, but I get the error: This action would increase the number of cells in the workbook above the limit of 5000000 cells.
I am running ALL the fields for a complete report. I know I saw something about setting the param to not exceed this number, but I can't find the code for it now that I need it. Can anyone help me?
//Running Keyword Performance Report
var QUERIES = [{'query' : 'SELECT AbsoluteTopImpressionPercentage, AccountCurrencyCode, AccountDescriptiveName, AccountTimeZone, ActiveViewCpm, ActiveViewCtr, ActiveViewImpressions, ActiveViewMeasurability, ActiveViewMeasurableCost, ActiveViewMeasurableImpressions, ActiveViewViewability, AdGroupId, AdGroupName, AdGroupStatus, AllConversionRate, AllConversions, AllConversionValue, ApprovalStatus, AverageCost, AverageCpc, AverageCpe, AverageCpm, AverageCpv, AveragePageviews, AveragePosition, AverageTimeOnSite, BaseAdGroupId, BaseCampaignId, BiddingStrategyId, BiddingStrategyName, BiddingStrategySource, BiddingStrategyType, BounceRate, CampaignId, CampaignName, CampaignStatus, ClickAssistedConversions, ClickAssistedConversionsOverLastClickConversions, ClickAssistedConversionValue, Clicks, ConversionRate, Conversions, ConversionValue, Cost, CostPerAllConversion, CostPerConversion, CostPerCurrentModelAttributedConversion, CpcBid, CpcBidSource, CpmBid, CreativeQualityScore, Criteria, CriteriaDestinationUrl, CrossDeviceConversions, Ctr, CurrentModelAttributedConversions, CurrentModelAttributedConversionValue, CustomerDescriptiveName, Date, DayOfWeek, EngagementRate, Engagements, EnhancedCpcEnabled, EstimatedAddClicksAtFirstPositionCpc, EstimatedAddCostAtFirstPositionCpc, FinalAppUrls, FinalMobileUrls, FinalUrls, FinalUrlSuffix, FirstPageCpc, FirstPositionCpc, GmailForwards, GmailSaves, GmailSecondaryClicks, HasQualityScore, HistoricalCreativeQualityScore, HistoricalLandingPageQualityScore, HistoricalQualityScore, HistoricalSearchPredictedCtr, Id, ImpressionAssistedConversions, ImpressionAssistedConversionsOverLastClickConversions, ImpressionAssistedConversionValue, Impressions, InteractionRate, Interactions, InteractionTypes, IsNegative, KeywordMatchType, LabelIds, Labels, Month, MonthOfYear, PercentNewVisitors, PostClickQualityScore, QualityScore, Quarter, SearchAbsoluteTopImpressionShare, SearchBudgetLostAbsoluteTopImpressionShare, SearchBudgetLostTopImpressionShare, SearchExactMatchImpressionShare, SearchImpressionShare, SearchPredictedCtr, SearchRankLostAbsoluteTopImpressionShare, SearchRankLostImpressionShare, SearchRankLostTopImpressionShare, SearchTopImpressionShare, Status, SystemServingStatus, TopImpressionPercentage, TopOfPageCpc, TrackingUrlTemplate, UrlCustomParameters, ValuePerAllConversion, ValuePerConversion, ValuePerCurrentModelAttributedConversion, VerticalId, VideoQuartile100Rate, VideoQuartile25Rate, VideoQuartile50Rate, VideoQuartile75Rate, VideoViewRate, VideoViews, ViewThroughConversions, Week, Year ' +
'FROM KEYWORDS_PERFORMANCE_REPORT ' +
'DURING LAST_30_DAYS',
//Put Url of Google spreadsheet the script with update
'spreadsheetUrl' : 'SPREADSHEET_URL_HERE',
//Add tabName for different tabs if you want to add more Reports
'tabName' : 'Sheet1',
//Use Current version for AdWords: Check for Google Adwords updates on versions
'reportVersion' : 'v201809'
}];
// Setting the Data to Print to Spreadsheet and update
function main() {
for(var i in QUERIES) {
var queryObject = QUERIES[i];
var query = queryObject.query;
var spreadsheetUrl = queryObject.spreadsheetUrl;
var tabName = queryObject.tabName;
var reportVersion = queryObject.reportVersion;
//log to view bugs
Logger.log(spreadsheetUrl + " " + query);
//Don't forget to put spreadsheet Url in code above
var spreadsheet = SpreadsheetApp.openByUrl(spreadsheetUrl);
//this calls the tab name and will not print without name
var sheet = spreadsheet.getSheetByName(tabName);
var report = AdWordsApp.report(query, {apiVersion: reportVersion});
report.exportToSheet(sheet);
}
}