Read data from google docs spreadsheets - java

In my app I have to show the details of a google docs spreadsheet.
In this spreadsheet I have 2 sheets. Each sheet details I have to show in 2 different activities.
Can anyone help me out to implement this functionality. What all things are required for this? I found one jar named jxl.jar. Should I use that?

For:
programmatically access and manipulate user data stored with Google
Documents
there is the Google Documents List API.
If you want to create/edit spreadsheets, you'll need to use the Google Spreadsheets API.
Both those APIs are part of the gData-API. The Java-client library s (.jar-files which can be used with your Android Project) can be downloaded here.

Related

Open online document with Google Docs

Does Google provides any API for open the online document(.docx) with Google Docs? if yes any materials that I can refer to? My idea is client can upload the document to the website then it can open and edit it by using Google Docs instead of download it and open with installed software.
Google drive has a REST API
the article on their site
You will be able to upload / edit files from the user and the user will be able to open them but I don't know if you can force open a document.
And if you use this API it would require the user to login in which may or may not be something you want.
Or you could have a look at google picker (found om the same link)
Create and open files using the Google Picker
Drive files can be opened from an application independently of the
Drive UI. An application can easily fetch and display a list of files
with the Google Picker as described in Open files using the Google
Picker.
Anyway: Do some more research on their site, you will probably get it done with Google Picker

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.

Android and Spreadsheet interaction

I am developing an app and I need the app to be able to post data into a spreadsheet. I hear google API has something for this?
Does it handle creating spreadsheets and then adding data to tables etc?
Simply the process is:
- Create spreadsheet
- Upload it to the web (google docs spreadsheet)
- It gives you a URL to the spreadsheet
- Send data to it via JSON requests
To learn more about how to implement it see this article here which talks about how to Use a Google Spreadsheet as your JSON backend or for more links type that term in to google.
Also don't see this as an easy way out to not having to deal with a database, if you are designing an app and you need it to be secure then you are better off learning how to use sqlite or the likes

how to insert data into google spreadsheet from html forms using java?

I am having HTML pages. when i click on the button the form data will be inserted into the Google spreadsheet using eithe java/javascript.
can i use any API's please provide me some tutorial
Google provide decent documentation for their APIs

Automating tasks through java

Here's the problem:
Run a java client as a batch job on a unix box which will connect to Oracle and fetch some data.
Update an excel sheet (on a Windows machine) with the data fetched.
Create a chart/graph from the data in excel sheet.
Send the excel (with data & graph) in an email.
All the above steps must be performed without any manual intervention.
Could there be a better option to excel based solution? The main intent is to have a history of data fetched and have a chart created from that data.
I know there are many open source libraries available for creating charts like JFreeChart, but is there anything in the JDK that allows you to create charts? Could JavaFX be used for this problem?
In short, is it possible to do this with just jdk (without using any open source libraries)?
Any help/suggestion will be appreciated.
You could try google docs spread sheet api to workaround MS-Excel
I think all that is pretty doable from Google docs, and yet, you still have the option of downloading the spread sheet.
From the link:
Spreadsheets Data API
The Spreadsheets Data API lets you access worksheet data within your own application or website. You can view and modify data, create and delete worksheets, issue structured queries, and more.
Spreadsheets Gadgets & Visualization API
Spreadsheets Gadgets take advantage of the Google Visualization API to embed graphical comparisons of of structured data within a spreadsheet.
Sounds like what you need.
Pretty straightforward, just use Hibernate or even jdbc.
You should be able to update the Excel sheet with Apache POI. You could also try Java Excel Designer or http://www.moyosoft.com/jec/
At least one of the above should be able to create charts.
Just use Java Mail
You could wrap the above in ANT tasks as appropriate.

Categories

Resources