Load a ListView from Google sheet

I need to load into a ListView (Image,MainText,Detail) the content of a Google Sheet like the one shown. I mean load directly like the blocks shown.


IN GSHEET

What's in column C?

Are those Unicode characters, or are they images?

Images png images. The blocks shown reads column 1 and 2 only. Disregard the image. In the picture the result on my cell.

See the listview blocks to understand how to set an element for the listview. You will need to iterate over the list you get back from google sheets, and set each value in each item of the list to main and detail accordingly.

Yes I alreadi did it. The problem is very slow.

really ?

Show your blocks

1 Like

You ask that...

Your blocks do not show this in detail, or show how the list elements are generated ?

image

This is the low speed version.

Hmmm, well based upon what you have said above:

image

image

This takes under a second on wifi

Note: I do not believe that the images you show in the spreadsheet will "download" and be visible as images in your listview. You would need to save images, e.g. png or jpg, in your google drive, and provide the correct urls for each of these, in order for them to be displayed. See below for the url format now required:

image

Such urls would need to be your C1 - C4 cell contents.

What does the recursive procedure DEST_AGFTST do with its bit manipulation?

To ABG
The parameter AGS is a 3 bit value (0 to 7) and each bit indicates the list to be loaded (Agenda,Fatto,Storico). Could be 7 that means all or any other combination. On each loop clear the bit of the list already loaded.

To TIMAI2
I thank you so much for your suggestion. The way is now is that in my Google Sheet i have the name of the picture in text mode. That means that I need download the sheet and loop on it getting the real image from a local file and build the ListView (as shown in the block). This takes for 400 lines about 10/15 seconds on my environments. My request was done hoping that there was some way of doing it with a download directly from sheet to listview (could be a suggestion for a new block).

thanks to all of you

Show an example of what is on the google sheet and what a local file looks like, and where is it stored.

How many rows on the sheet/sheets, therefore how many images.

Is stored in a list and the in a ListView (you can see the resukts in the video i sent)

I work now with 6 sheets
each sheets can hold up to 1000 rows but now max 500
images are about 20 and are stored in apps folders
The img i sent are first the contents of one sheet the second the contents of correlated file in app folder.


Not sure why you download and parse the data twice?

You could split out your data in the spreadsheet to three columns?

The images could all just be in one folder? What are the sizes of your images, they probably do not need to be any bigger than 75x75 pixels.

Consider just downloading only new data (based upon date/time?), to add to / replace the existing data ?

This should not be that slow, even for 500 rows.

I would like to see your logical data model, hopefully in English.

I suspect premature optimisation.

There are fast advanced list blocks that might help here if you get your table structures right.

Images are less than 75x75 pixels. Downloading all the lines occurs only at the beginning of the app because I don't keep the data on the cell phone as the app is multi-user (me and my wife :)). Yes, updates are limited to a single note. I'm trying a different system for keeping data on sheets and if it works I'll let you know. Thank you.