Solved

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Angular 2 - Issue in page Layout 2 60
app server have enough resources... 2 42
remove background quote mark from widget 6 53
what are list of ebay api errors 1 19
Read about why website design really matters in today's demanding market.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This Micro Tutorial will demonstrate the easy use of Gmail embedding images in your email so the recipient of your email can view them in context.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

803 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