Write and run SAS programs in your web browser

Import data Google SpreadSheet

Reply
Occasional Contributor
Posts: 8

Import data Google SpreadSheet

How can I import data from a Google Spreadsheet to Sas Studio?
Please help me, I have tried with this code, but it does not work

FILENAME running url
'https://docs.google.com/spreadsheets/d/1imuF6wDrCcAlLSY4Q4LYhCOpnEyWssnxgLY7qVCWpng/pub?output=csv' debug;
proc import datafile=running out=running
DBMS=CSV REPLACE;
GETNAMES=Yes;
DATAROW=2;
run;

I appreciate your help

PROC Star
Posts: 7,431

Re: Import data Google SpreadSheet

This might be what you're looking for: http://support.sas.com/resources/papers/proceedings12/240-2012.pdf

 

Art, CEO, AnalystFinder.com

 

Occasional Contributor
Posts: 8

Re: Import data Google SpreadSheet

I already tried it and it does not work Smiley Sad

 

 

PROC Star
Posts: 7,431

Re: Import data Google SpreadSheet

Your code worked for me and created the 'running' sas dataset. What kind of error are you getting?

 

Art, CEO, AnalystFinder.com

 

 

 

Occasional Contributor
Posts: 8

Re: Import data Google SpreadSheet

what's going on? any ideas


2017-04-15.png
PROC Star
Posts: 7,431

Re: Import data Google SpreadSheet

Post your actual log. The part you captured only said the file doesn't exist, which we know isn't true!

 

Do you have web access permission when you're running SAS Studio. If you're on UE, you don't!

 

Art, CEO, AnalystFinder.com

 

Community Manager
Posts: 2,884

Re: Import data Google SpreadSheet

SAS University Edition can access the web, but cannot access HTTPS (SSL) because it doesn't include the encrypt/decrypt components that are needed.

 

If using SAS Studio outside of SAS University Edition, try this method:

 

http://blogs.sas.com/content/sasdummy/2012/12/18/using-sas-to-access-data-stored-on-dropbox/

 

It includes a Google Doc example.

 

Occasional Contributor
Posts: 8

Re: Import data Google SpreadSheet

Community Manager
Posts: 2,884

Re: Import data Google SpreadSheet

I think it's because you are using SAS University Edition, and so you cannot access the https Google docs site.  SAS University Edition does not include the SSL support needed to access secure web sites.

Occasional Contributor
Posts: 8

Re: Import data Google SpreadSheet

Thanks, in this video show that are saved in "file shortcuts" will open way to call them from there?

https://www.youtube.com/watch?v=Ex3x9YPMEFA

Uploaded by ICAEPP on 2017-04-16.
Community Manager
Posts: 2,884

Re: Import data Google SpreadSheet

Use your browser to save the Google Doc download in your shared folder (for SAS University Edition).  Then you can use something like:

 

  filename myfile '/folders/myfolders/savedfile.csv';

 

To reference it, and PROC IMPORT from there.

 

See:

https://support.sas.com/software/products/university-edition/faq/shared_folder_whatis.htm

 

And:

https://support.sas.com/software/products/university-edition/faq/shared_folder_access.htm

Ask a Question
Discussion stats
  • 10 replies
  • 605 views
  • 7 likes
  • 3 in conversation