how to upload an excel sheet in google drive using java api - java

In the Google developers code, method to upload a spreadsheet is given for .net but not java . Does any one know the sample code for this . code on how to convert an excel file to a spreadsheet and upload it will also do .

Can you please check the below url. It might help you
http://stackoverflow.com/questions/19361814/create-spreadsheet-using-google-spreadsheet-api-in-google-drive-java

login/OAuth2 The Google "DrEdit" tutorial is a good starting place for login/OAuth2 etc.
Upload: The only method I have seen uses Google drive sdk
Java example here:
https://developers.google.com/drive/v2/reference/files/insert
An example of the convert, (in PHP) using the same API,
Create a Google Drive Spreadsheet from a local CSV file via the Google Drive API

Related

Sharepoint site Excel file operations using Java graph apis

Would like to create the excel file on sharepoint site using Java Graph API , also would like to get the id of the same file so that modifications on the file can be done using the Graph API.
One should have the Drive Id , Site Id handy for doing this.
Create a folder on your sharepoint site , share the same folder in one drive so that the paths can be used to upload the excel file.
Use the below given link for more information.
https://rahul-metangale.medium.com/upload-a-file-to-sharepoint-using-azure-graph-api-9deacce57449
There is more to this than specified in this blog.

How to create a Spread Sheet on Google Drive Using Java and Drive API

I'm trying to create a spreadsheet on google drive using DRIVE API in Java, the documentation on google site is very confusing, can somebody please help me by pointing to a sample example that demonstrate the creation of documents on google drive in Java using the latest DRIVE API?
Based from this SO question, using Drive API seems to only let you create new empty files with the spreadsheet MIME type. The Drive API is only concerned with operations at the whole file level. It is only possible in Google Drive to upload the created spreadsheet.
You can use Google Sheets API (formerly called the Google Spreadsheets API) which lets you develop client applications that create, read and modify worksheets and data in Google Sheets. This API can manage the worksheets in a Google Sheets file. You should strongly consider using a GData client library to interact with the API. Follow the following steps here to setup a development environment for working with the Sheets API.
You can create a spreadsheet via Drive API by calling files.create() with mimeType=application/vnd.google-apps.spreadsheet and uploading a CSV file. See Importing to Google Docs Types where there's a Java sample.

Upload feature from Google drive & local

Is there a way to upload a file from Google Drive to Blobstore using a Google Appengine Form.
In have a user form which require attachment feature . The attachment can be a file from local or from google Drive .
It Would be nice if any Google Developer post a Java reference code
You can use the Google Docs Picker to select a file on disk or on Google Drive : https://developers.google.com/picker/docs/?hl=fr
For Google Drive files, you can download its on App Engine and then store into the Blobstore or Google Cloud Storage : https://developers.google.com/drive/web/manage-downloads
It's just reading file input stream and write file output stream where you want (but not on file system because it's impossible on App Engine for security reasons)
Relative to Google, there is no good reasons to use blobstore anymore so I advise you to use Cloud Storage.

Use Google Docs API to download file of any type

Is it possible to download files of any type from Google Docs using the Google Docs API? (jpg, zip, txt)
I can figure out how to download word, powerpoint, and excel files but want to be able to upload and download any type of file to Google Docs. I know it is possible to do this with the online uploader but can't seem to get the downloading part to work with the API.
I'm using the Java wrapper to the API. Is it possible to use the Java version of the API to download all file types?
Since the last answer was written, that API is deprecated. There's sample Java code on the Google Dev page for the (newer) Google Drive API for managing downloads from Google Docs.
This handles a large variety of MIME types.
See this page http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html
and this for specifically downloading documents and files
http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#DownloadingDocsAndFiles
The document listing XML returned by google has file type and the URL to download the file in the node. You can use the URL to download the file contents.

How to create an excel file in google app engine (java)?

A question that seems to have quite a few options for Python, but none for Java after googling for two days. Really really could use some help all I have found so far is a recommendation to use gaeVFS to build an excel file from the xml components and then zip it all together which sounds like a slap in the face. Oh yes and if you were wondering I am questioning my use of Java rather than python but at 5,000 lines of code it would be insane to turn back now...
Other things you might find useful
Client: GWT
Server: Servlets running
on google app engine storing data
into the google data store
Excel file: mandatory, CSV isn't good
enough, no need to save the file just
to be able to "serve" it to the
client i.e. open a "Save As" box.
Have you checked out this api already: Java Excel API ?
You could also take a look at the Apache POI project. You can read and write MS Excel documents with this library.
Take a look at this post.
It's a step by step tutorial on how to generate excel files on google app engine.
Try this :
http://code.google.com/p/gwt-table-to-excel/
google app engine do not support input/output stream classes, you need to use google app engine virtual file system.

Categories

Resources