Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to fetch the number of commits ahead and behind master of a github branch. 2 39
PHP Installer 5 47
Replace value 2 36
Making exceptions for ValidationAttribute 2 27
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This Micro Tutorial demonstrates how to quickly find related content for YourTango's posts using MozBar Chrome extension.
This Micro Tutorial will demonstrate common damaging and frequent mistakes I see in most analytic audits. Most of them are campaign tagging mistakes, so this video will break it down into simple steps.

696 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