I'm trying to get the charts from a sheet as img. This is working fine on my personal gmail account. But when i try this test function in my Gsuite account (as admin) i get 0 charts (from 4)
I read some comments here that you need to share (with link). But this does not solve my issue. Anyone an idea?
EDIT: I added drive and sheets API to the services. But this does not solve the issue.
ISSUE EDIT: For information. This is a issue from google. Turns out i was testing with just the first chart that came up (column chart). But i was trying the get the SCORECARD. This is not possible right now..
https://issuetracker.google.com/issues/154996585
The test script:
function testCharts(){
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Chart");
const charts = sheet.getCharts();
console.log(charts.length);
console.log(charts[0].getRanges()[0].getA1Notation());
}