Hello,

I am struggling to convert an Account Performance Report into a 
CSVFOREXCEL. I've tried using both report_downloader.DownloadReport and 
report_downloader.DownloadReportWithAWQL.

I have been using the code examples from the Documentation:


  # Create report query.
  report_query = (adwords.ReportQueryBuilder()
                  .Select('CampaignId', 'AdGroupId', 'Id', 'Criteria',
                          'CriteriaType', 'FinalUrls', 'Impressions', 'Clicks',
                          'Cost')
                  .From('CRITERIA_PERFORMANCE_REPORT')
                  .Where('Status').In('ENABLED', 'PAUSED')
                  .During('LAST_7_DAYS')
                  .Build())

  # You can provide a file object to write the output to. For this
  # demonstration we use sys.stdout to write the report to the screen.
  report_downloader.DownloadReportWithAwql(
      report_query, 'CSV', sys.stdout, skip_report_header=False,
      skip_column_header=False, skip_report_summary=False,
      include_zero_impressions=True)



However, when I change the download type from CSV to CSVFOREXCEL, I begin 
to get this error:

'UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: 
invalid start byte'

Also, when I try providing a file object PATH
PATH = r'C:\Users\morehek\intraday.csv'

 in the place of  sys.stdout, I receive errors that I cannot write the 
output to a string object. 

Can someone on the Adwords team please advise me on how to cleanly write a 
report download into a Microsoft Excel CSV? 

Thanks
-Matt






-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6ed15fb1-deb9-4796-a084-ae0bcabd0f63%40googlegroups.com.

Reply via email to