console.table

165 views
Skip to first unread message

ava sim

unread,
Jun 22, 2023, 12:32:45 PM6/22/23
to Google Ads Scripts Forum
Hello! I want to use console.table in my code however google scripts keeps saying that "console.table is not a function". Does google scripts not allow console.table? Because I know it is a function. Please let me know!

Thanks!

Sigurd Fabrin

unread,
Jun 23, 2023, 4:43:39 AM6/23/23
to Google Ads Scripts Forum
Google Ads script doesn't support everything from js - especially newer concepts.

Screenshot shows what console methods app script (essentially the same as GA script) supports https://developers.google.com/apps-script/reference/base/console

Screenshot 2023-06-23 at 10.37.47.png


Sigurd

Google Ads Scripts Forum

unread,
Jul 20, 2023, 10:06:04 AM7/20/23
to Google Ads Scripts Forum

Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/TtgXK9GNhuM) from the forum as it wasn't routed to our support queue. 


Regards, 

Google Ads Scripts Support Team

Google Ads Scripts Forum

unread,
Jul 20, 2023, 11:00:34 AM7/20/23
to Google Ads Scripts Forum

Hi,


Thank you for reaching out to the Google Ads Scripts Support Team. Please excuse us for only getting back now as your message failed to be routed to our support queue.


@ Sigurd, Thank you for your insights.


I would agree with Sigurd’s comment to utilize methods that are available for Apps Script on our script, however, if you have any further questions on these methods, they have a separate support team that you can contact through this link: https://developers.google.com/apps-script/support.


In addition, you can refer to our documentation for the functions/methods supported in Google Ads Scripts. You can verify that the feature is supported in Google Ads scripts by checking the reference documentation.


Let me know if you have any questions.


Regards,

Google Ads Scripts support team

Boris Baublys

unread,
Jun 9, 2025, 12:20:59 PM6/9/25
to Google Ads Scripts Forum
Now I also wanted to output data to the console in tabular form, but it turned out that console.table only exists for JavaScript, but not for AppScript.
// My object:
{
  "spreadsheetId": "Table_ID",
    "sheetName": "Sheet_name",
      "images": [
        {
          "index": 0,
          "anchorCell": "A1",
          "width": 100,
          "height": 150
        },
        // ...
      ]
}

So I wrote a substitute:
function myFunction() {
  // Generate tabular output to the log
  var header = 'Table ID | Sheet name | Index | Anchor | Width | Height';
  var separator = '-'.repeat(header.length);
  Logger.log(header);
  Logger.log(separator);

  result.images.forEach(function (img) {
    var row = [
      result.spreadsheetId,
      result.sheetName,
      img.index,
      img.anchorCell,
      img.width,
      img.height
    ].join(' | ');
    Logger.log(row);
  });
}

Google Ads Scripts Forum Advisor

unread,
Jun 9, 2025, 2:10:48 PM6/9/25
to adwords...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads Scripts support team.

Kindly note that our support team specialized in addressing issues related to the Google Ads Scripts. As the issue is related to the Google Apps Script, I would recommend that you reach out to the Google Apps Script support team as they are better equipped to resolve your issue.

Feel free to contact us if you have any concerns related to the Google Ads Scripts.

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-09 18:09:42Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rehV0:ref" (ADR-00313054)



Reply all
Reply to author
Forward
0 new messages