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

  • SEARCH
  • Home
  • 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 1068383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:16:46+00:00 2026-05-16T20:16:46+00:00

I would like to have some Javascript code running in a web browser write

  • 0

I would like to have some Javascript code running in a web browser write to a Google Spreadsheet in the user’s Google account.

The Javascript API is a bit long-winded, involving lots of round trips, but does seem to work. I can successfully log in, create a new spreadsheet, read values from it, update cells, etc. However, I haven’t yet figured out how to write to an empty cell. (By empty, I mean that a cell that has had no value written into it yet.)

The issue is: in order to update the value of a cell, I need to know that cell’s id. To get the cell’s id, I read the cell feed, which shows me the contents (and id) of all non-empty cells. However it won’t show me empty cells, therefore I don’t know their id, therefore I can’t write to them. I’ve tried making up my own id based on the naming pattern of the other cells, but that doesn’t work.

There must be an easy way round this. What is it?

(Context: what I’m actually doing is trying to store user preferences in the user’s Google account. The spreadsheet API seems like to be the only one that’s feasible to use from a pure Javascript environment. If anyone can suggest any alternatives that’s easier to use than Spreadsheets, I’d be grateful.)

  • 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-05-16T20:16:47+00:00Added an answer on May 16, 2026 at 8:16 pm

    I was about to ask a similar question when I stumbled upon yours and while in the process of compiling my question I found the answer!

    http://code.google.com/apis/spreadsheets/data/2.0/reference.html#CellParameters

    There is a property called return-empty which is set to false by default hence only returning cells that aren’t empty in the feed. Set this to “true” in your cell query and you will be able to update the value of empty cells.

    I’ve testing this using the .NET API .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some clients who are not English speaking. They would like the JavaScript
I would like to have some functionality by which if I write <textarea maxlength=50></textarea>
If you have some blocks of code that you would like to prevent execution
I have some Objective-C [i-os] code that I would like to run unit tests
i have some javascript code in Django templates like this <script type=text/javascript> pager.init(); pager.showPageNav('pager',
I would like to have some space between the same line.. I know there
I have some files in my SVN repository that I would like to have
I have some text in a UITextView, that I would like to have show
I have some files that I would like to rename using regex and powershell,
I have some data that I would like to visualize. Each byte of the

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.