Solved

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

Posted on 2014-01-03
5
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 53

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 53

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This Micro Tutorial will demonstrate importing calendar invites from events such as webinars into your Google Calendar.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

695 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