Solved

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

Posted on 2014-01-03
5
304 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re looking to gather data for research or gather feedback on an idea, being able to build and distribute your own online survey is not only cost-effective, but allows you to reach a larger audience and receive results in real-time. Googl…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This Micro Tutorial will demonstrate how to use comments in Google Docs. You will learn how to create, edit, and delete a comment.
This Micro Tutorial demonstrates how to quickly find related content for YourTango's posts using MozBar Chrome extension.

895 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

13 Experts available now in Live!

Get 1:1 Help Now