Invoke: no method named `ReadColumn' in class com.google.appinventor.components.runtime.Spreadsheet

Hi there, I am a newbie and trying to use Google Sheets. I can successfully read my whole sheet with .ReadSheet, I can also use .ReadWithExactFilter etc. but if I try to read a column with .ReadColumn, it always fails.

Here is my Google Sheet:
GoogleSheet

And here are my blocks:
Blocks

And here is the error message:

invoke: no method named `ReadColumn' in class com.google.appinventor.components.runtime.Spreadsheet

I am using the Spreadsheet componant under Storage section in Designer:
Spreadsheet

Help apreciated. Brgds/Jerome

Android or iOS?

Are you running companion version 2.66? When the Spreadsheet component came out in 2.65, the ReadColumn method was called ReadCol, but we decided that it wouldn't be appropriate in the long term to use the programmer abbreviated names for new users. If other operations work with the Spreadsheet but ReadColumn doesn't, you probably need to upgrade to the latest version.

1 Like

This is Android and I am using the emulator with aiStarter. I am using :
Construction: March 21 2023 Version: nb192
Use Companion: 2.66 or 2.66u
Target Android SDK: 31 (Android 12.0)

AppInventorVersion

Would that make a difference if I use AI Companion or if I compile an apk and install it ?

Note that this dialog only indicates the desired companion app version. This can be different from what you are actually running on your device or in the emulator. You should check the version number the emulator shows when it starts up (but before your app appears).

If you're unsure, once the emulator is connected you can always use the Help > Update the Companion menu item to request an update.

If it helps, ReadColumn works OK on my Androidx86 emulator, which is running Android 9.This with companion 2.66

Well, when the emulator is starting, I see the following:
EmulatorStart
If I click on 'About this application', it shows the following:
EmulatorAbout
If I use the vetival bar on the right of the emulator. ... then Help then About , it shows the following:


Emulator version: 30.3.5-7033400
Latest avaliable emulator version: 33.1.4-9936625 (Canary update channel)
Tomorrow will give a try with the Companion AI and not the Emulator.
Thanks for the help !

I'd still recommend using the Update the Companion option once the emulator has started to ensure you have the latest version.

Hi ewpatton,
Did not find on either the Enulatior or the AI Companion a way to update... I found it on the menu of the web AI Inventor
image
If I use it with the emulator running, I have this info box:
image
...but then , well nothing happens :wink:
If I use it while the AI Companion is running it says it is only for the emulator.

Anyway, 2 good news:

  1. if I compile an install the apk, it works well :slight_smile: I can get column.
  2. now it works with AI Companion, issue is now only with the emulatir, which is not a big deal.

Thanks for the help.

You can side-load the latest downloaded .apk of the Companion app onto a running emulator, usually by dropping the file onto the emulator screen.

Some emulators have a control to pull in an .apk file from the emulator's host PC.

Thanks ABG. Indeed I can drag and drop the apk file to the emulator, it seems to work (it says installing APK) but then I can't find in the emulator GUI how to run the just installed APK. Sorry, I feel so dumb. Will dig further

This is tricky.

Close whatever app is currently running, or look for the Android control that gets you to its 'desktop'.

Look for a ^ somewhere in the middle, and drag that up to see all installed apps.
Video at

Thanks ABG ! Did not think to swipe bottom to up. Allowed me to long-richt-click on the MIT Ai" icon
image
and then get to App info


And the version is : 2.65u

Thanks to your link to video, I was finally able to run the APK that I just dropped into the emulatir, thanks a lot. And it works well with .GetColumn.