Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8641391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:30:50+00:00 2026-06-12T11:30:50+00:00

I have one Spreadsheet file in my Google Drive which i want to sync

  • 0

I have one Spreadsheet file in my Google Drive which i want to sync from an Android Application. After a successful sync I have some search criteria in my apps, I want results based on this criteria from the file which I sync. I am doing this for the first time and not getting good resources to start with.

1) How to sync Google Drive file in Android App?

2) How to retrieve particular data from the Spreadsheet which i have synced?

Note – I am also confused between Google Docs API & Google Drive SDK.

What to use in my app?

I have only one file to sync every time, not all the files. And the file is open to all with a private key.

I have implemented some code but it’s not working. Below is my spreadsheet public url which i want to sync in my android app.

I am following steps from here.

My Test Spreadsheet URL

try {
    String USERNAME = "xxxxx";
    String PASSWORD = "xxxxx";

    SpreadsheetService service =
        new SpreadsheetService("Testing");
    service.setUserCredentials(USERNAME, PASSWORD);
    // TODO: Authorize the service object for a specific user (see other sections)

    // Define the URL to request.  This should never change.
    URL SPREADSHEET_FEED_URL = new URL(
            "https://spreadsheets.google.com/feeds/spreadsheets/private/full");

    // Make a request to the API and get all spreadsheets.
    SpreadsheetFeed feed = service.getFeed(SPREADSHEET_FEED_URL,
            SpreadsheetFeed.class);
    List<SpreadsheetEntry> spreadsheets = feed.getEntries();

    if (spreadsheets.size() == 0) {
        // TODO: There were no spreadsheets, act accordingly.
    }

    // TODO: Choose a spreadsheet more intelligently based on your
    // app's needs.
    SpreadsheetEntry spreadsheet = spreadsheets.get(0);
    System.out.println(spreadsheet.getTitle().getPlainText());

    // Make a request to the API to fetch information about all
    // worksheets in the spreadsheet.
    List<WorksheetEntry> worksheets = spreadsheet.getWorksheets();

    // Iterate through each worksheet in the spreadsheet.
    for (WorksheetEntry worksheet : worksheets) {
        // Get the worksheet's title, row count, and column count.
        String title = worksheet.getTitle().getPlainText();
        int rowCount = worksheet.getRowCount();
        int colCount = worksheet.getColCount();

        // Print the fetched information to the screen for this worksheet.
        System.out.println("\t" + title + "- rows:" + rowCount + " cols: " + colCount);
    }
} catch (Exception e) {
    e.printStackTrace();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:30:52+00:00Added an answer on June 12, 2026 at 11:30 am

    I got it. I have not added the permission and that is why it is giving me error. We need to add below permission for authorization.

    <uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have wrote a script that was run from a spreadsheet. I had One
I have one spreadsheet already saved with some data, then in a new spreadsheet
I have one spreadsheet of google docs with data like : 0012 0234 0065
I have an excel spreadsheet with two columns, one with a list of exercises
I have a set of Excel spreadsheets with multiple tabs which contains each one
I have one XML request which I need to modify (to XML) and then
I have one drop down list in my page, which contains two options. What
at the moment I have a small application and need to take information from
I did the following things: I have a spreadsheet with data. One of the
I have one master spreadsheet and a number of copies. This master spreadsheet uses

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.