Can't setup Oauth2 to import Google Sheet to Excel

201 views
Skip to first unread message

sc...@xlautomation.com.au

unread,
Feb 27, 2015, 3:08:22 PM2/27/15
to excel-r...@googlegroups.com
I am trying to use your examples to import a google sheet into Excel for reporting analysis
I have installed CAPICOM and downloaded the "oauth2credentials.xlsm" and "cDataSet.xlsm" files.
But I cannot work out what I need to do to run the "firstTimeOauth2" routine to set the credentials in my registry before using those to access the Google Sheets...
I am sure that I need to include something in place of the "xxxxxxx" below....but what is that supposed to be.
I have an Google Apps account for my business...

'or you can do first ever like this
    With getGoogled("viz", , "xxxxxx.apps.googleusercontent.com", "xxxxxxx")
        Debug.Print .authHeader
        .tearDown
    End With

Any help appreciated...

Bruce Mcpherson

unread,
Feb 27, 2015, 6:22:33 PM2/27/15
to excel-r...@googlegroups.com
You need to go to the google cloud console and create an application. This will give you some credentials that you can use here. Are you familiar with the cloud console?

Sent from my iPad
--
You received this message because you are subscribed to the Google Groups "Excel Liberation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-ramblin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

james...@sealedair.com

unread,
Dec 30, 2016, 10:27:13 AM12/30/16
to Excel Liberation
Bruce, I am getting an ' the parameter is not correct error' with  "firstTimeOauth2", I see on the web someone else has had this problem, was there ever a solution ? thanks

I would post this on G+ but it says I need Company credentials, have the three basic REST parameters changed ?

Bruce Mcpherson

unread,
Dec 30, 2016, 1:48:46 PM12/30/16
to excel-r...@googlegroups.com
Can you send me the exact code youre getting the error with to br...@mcpher.com. Disguise the credentials if you like.

Bruce

Sent from my iPad

James Engel

unread,
Dec 30, 2016, 2:19:58 PM12/30/16
to excel-r...@googlegroups.com
the error is attached, I checked the scope definition for "sheets" which is correct, so the three required objects seem correct



// this is about setting up for OAUTH2
'// all you have to do is to create a google console developer project
'// create some credentials of app type other
'// activeate the sheets api
'// copy the credentials to the below function (the ones here wont work- they are deactivated)
'// and run this function once.
'// you can delete it once you;ve run it - its not needed any more if you successfully go through the google auth process
Private Function sheetsOnceOff()
    
    getGoogled "sheets", , _
    "CFZwF2GbnMHL1vBtGqA9oK2h"
    



End Function

On Fri, Dec 30, 2016 at 12:48 PM, Bruce Mcpherson <br...@mcpher.com> wrote:
Can you send me the exact code youre getting the error with to br...@mcpher.com. Disguise the credentials if you like.

Bruce

Sent from my iPad

On Dec 30, 2016, at 3:27 PM, james.engel via Excel Liberation <excel-ramblings@googlegroups.com> wrote:

Bruce, I am getting an ' the parameter is not correct error' with  "firstTimeOauth2", I see on the web someone else has had this problem, was there ever a solution ? thanks

I would post this on G+ but it says I need Company credentials, have the three basic REST parameters changed ?

On Friday, February 27, 2015 at 5:22:33 PM UTC-6, bruce wrote:
You need to go to the google cloud console and create an application. This will give you some credentials that you can use here. Are you familiar with the cloud console?

Sent from my iPad

On 27 Feb 2015, at 20:08, sc...@xlautomation.com.au wrote:

I am trying to use your examples to import a google sheet into Excel for reporting analysis
I have installed CAPICOM and downloaded the "oauth2credentials.xlsm" and "cDataSet.xlsm" files.
But I cannot work out what I need to do to run the "firstTimeOauth2" routine to set the credentials in my registry before using those to access the Google Sheets...
I am sure that I need to include something in place of the "xxxxxxx" below....but what is that supposed to be.
I have an Google Apps account for my business...

'or you can do first ever like this
    With getGoogled("viz", , "xxxxxx.apps.googleusercontent.com", "xxxxxxx")
        Debug.Print .authHeader
        .tearDown
    End With

Any help appreciated...

--
You received this message because you are subscribed to the Google Groups "Excel Liberation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-ramblin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Excel Liberation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-ramblings+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Excel Liberation" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/excel-ramblings/yrqFp_48F-s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to excel-ramblings+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
James J. Engel
Allegis Group Database Developer
Wauwatosa, Wisconsin USA

one time error.docx

James Engel

unread,
Jan 5, 2017, 1:55:19 PM1/5/17
to excel-r...@googlegroups.com
if you have the registry changes I could do them manually

thanks

burak...@gmail.com

unread,
Nov 12, 2018, 5:40:03 AM11/12/18
to Excel Liberation
Hi James,

Did you find any solution.

thanks

5 Ocak 2017 Perşembe 21:55:19 UTC+3 tarihinde James Engel yazdı:
if you have the registry changes I could do them manually

thanks
On Fri, Dec 30, 2016 at 1:19 PM, James Engel <james...@sealedair.com> wrote:
the error is attached, I checked the scope definition for "sheets" which is correct, so the three required objects seem correct



// this is about setting up for OAUTH2
'// all you have to do is to create a google console developer project
'// create some credentials of app type other
'// activeate the sheets api
'// copy the credentials to the below function (the ones here wont work- they are deactivated)
'// and run this function once.
'// you can delete it once you;ve run it - its not needed any more if you successfully go through the google auth process
Private Function sheetsOnceOff()
    
    getGoogled "sheets", , _
    "CFZwF2GbnMHL1vBtGqA9oK2h"
    



End Function
On Fri, Dec 30, 2016 at 12:48 PM, Bruce Mcpherson <br...@mcpher.com> wrote:
Can you send me the exact code youre getting the error with to br...@mcpher.com. Disguise the credentials if you like.

Bruce

Sent from my iPad

--
You received this message because you are subscribed to a topic in the Google Groups "Excel Liberation" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/excel-ramblings/yrqFp_48F-s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to excel-ramblin...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
James J. Engel
Allegis Group Database Developer
Wauwatosa, Wisconsin USA
james...@sealedair 414-841-8131




--
James J. Engel
Allegis Group Database Developer
Wauwatosa, Wisconsin USA
james...@sealedair 414-841-8131

Reply all
Reply to author
Forward
0 new messages