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 8362261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:54:04+00:00 2026-06-09T11:54:04+00:00

I’m creating a small script for Google Spreadsheets that will move numbers into one

  • 0

I’m creating a small script for Google Spreadsheets that will move numbers into one column and strings into the other. Should be pretty basic, but I’m just barely playing around with JS and naturally I’ve come across something that doesn’t make sense to me whatsoever.

Here’s the code.

function moveData() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var dataToMove = sheet.getRange("A1:A5003");
    var lastRow = sheet.getLastRow();


    for (var i = 0; i <= lastRow - 1; i++)
    {
        var unparsedValue = dataToMove[i];
        if(unparsedValue != "" && typeof unparsedValue === "number" && !isNaN(unparsedValue))
        {
            var parsedValue = unparsedValue;
            Logger.log(parsedValue);

        }
    }
}

It’s not all done obviously, but throws an error at var unparsedValue = dataToMove[i];

Error is as follows: Class “$Proxy810” has no public instance field or method named “0”

what is $Proxy810, and if I understand correctly why would it have a field, or method named “0”??

Little frustrating and any insight into this would be appreciated.

  • 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-09T11:54:05+00:00Added an answer on June 9, 2026 at 11:54 am

    It is obvious that sheet.getRange("A1:A5003") returns $Proxy810 instance and as first value in your loop is 0 your code on this line

    dataToMove[i];
    // is the same as 
    dataToMove[0];
    // is the same as 
    dataToMove.0
    

    and $Proxy810 doesn’t have property like that.

    I suppose that you need not loop using brackets, but use some method instead, although I’m not familiar with Spreadsheets API, but you need to look for something like dataToMove.getRow(i)

    EDITED: As first script example on google show, you need to use this code:

    function readRows() {
       var sheet = SpreadsheetApp.getActiveSheet();
       var rows = sheet.getDataRange();
       var numRows = rows.getNumRows();
       var values = rows.getValues();
    
       for (var i = 0; i <= numRows - 1; i++) {
           var row = values[i];
           Logger.log(row);
       }
    };
    

    So in your case you need to alter your code as follows:

    function moveData() {
        var sheet = SpreadsheetApp.getActiveSheet();
        var dataToMove = sheet.getRange("A1:A5003");
        var numRows = dataToMove.getNumRows();
        var values = dataToMove.getValues();
    
        for (var i = 0; i <= numRows - 1; i++)
        {
            var unparsedValue = values[i];
            if(unparsedValue != "" && typeof unparsedValue === "number" && !isNaN(unparsedValue))
            {
                var parsedValue = unparsedValue;
                Logger.log(parsedValue);
    
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
I know there's a lot of other questions out there that deal with this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,

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.