Solved

Make Save to Drive button convert a CSV to a Google Sheet

Posted on 2014-01-03
5
301 Views
Last Modified: 2015-03-02
We are using the 'Save to Drive' button (https://developers.google.com/drive/savetodrive) on our web site to allow clients to save CSV exports to Google Drive.

Unfortunately, this saves the file to the drive but doesn't automatically convert it to a Google Sheet. This means that users have to click 'Open with Google Drive Viewer' and then 'File > Open with Google Sheets’ to convert the file to a spreadsheet in Google Drive. This makes for a poor experience for our users.

Is there a way to ask Google Drive to automatically convert these documents on import? Thanks!
0
Comment
Question by:dustygulleson
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39755937
I have my settings set to convert and it works fine.

In drive, click on the big gear on the right.  Select Upload settings and select Convert to Google Docs.

I just created two files as a test with and without quotes.  
"one","twoL","three"
"four","five","six"

Open in new window

one,two,three
four,five,six

Open in new window

When uploaded, both converted.

If you manually upload your file by going to google drive and click the upload link on the left, will that convert?  Maybe something is wrong with the file?
0
 

Author Comment

by:dustygulleson
ID: 39756007
Thanks, but I've already tried this setting. We're not uploading a file in the traditional way, since we're sending it to a user's Google Drive account directly from a web site, so it doesn't seem to apply. The files convert fine when directly uploaded by a user, but we're trying to get around that process of them downloading and then uploading.
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39756565
I tried the example link and see what you mean.  The simple save to drive button does not allow convert.  

You will need to use the api instead https://developers.google.com/drive/v2/reference/files/insert?hl=en

When you post to the endpoint you will use POST https://www.googleapis.com/drive/v2/files?convert=true&key={YOUR_API_KEY} and have to go through the oAuth2
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This Micro Tutorial will introduce a Google tool, which is a great way to learn more about dimensions in metrics in Google Analytics, even if you use the interface or the API.
This Micro Tutorial will demonstrate Google Calendar to monitor updates with top sites, such as Facebook, Google, Twitter, etc. with Marketing News. Each update of Google Calendar can be monitored, correlate dips and spikes in your website traffic, …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now