Working with tabular data - search and storage

Hello everyone!
Dear community, I ask for your help.
I have an Excel spreadsheet where the leftmost column is age. This age determines the row in which three adjacent cells with numerical values ​​for this age should be found and these data are taken for calculations in the formula. How can I use such tables in the AI ​​application itself and (most importantly) how to search for neighboring cells by age parameter?

At the moment I have implemented everything using Google Sheets Document. The program sends and receives values ​​from the cloud table (this example is taken as a basis, but the table does the calculations by itself using the formulas.
It works, but not convenient. Data reception and transmission is periodically disrupted, there is no way to work without the Internet, and I do not know how the table will behave with multiple requests from different users.
How do I organize my data retrieval and storage? example of my table Screenshot_1

  1. It seems you issue is more about network connectivity than anything else.

You can test for a connection before exchanging data, if there is none, then changes could be stored until a connection is available.

Google Sheets can handle multiple users/requests.

  1. The Google Sheets component is not yet part of main appinventor, it may be worth considering another method to exchange data. You can start on that here:

Thanks for the answer. I'll take a look at the suggested links. The question is a little different: is it possible to get away from Google tables and implement data storage and retrieval directly in the AI application without third-party services?

Yes, you can store all the data on the app, but then how will other users access that data ?

They will install this application for themselves. In fact, this is just an advanced calculator for automating the calculation according to the data in tables (focusing on age). What tools can I use? My biggest challenge is finding and retrieving data from adjacent cells for a key indicator of age. Excel can do it. But how to do it in AI ?

Ah, so your data table is static, and just needs to be accessed by the app, not written to?

Easiest way is to create a csv file and upload this to your assets (Media folder). You then read this using the File component, and store into a list / tinydb.

1 Like

I tried doing сsv. Can't find and read related cells by value in month. Perhaps you have an example of such a solution?

The commas , shown in your data, are they decimal separators ? These would need to be converted to . in order to work in app inventor, and for the csv to be formatted correctly.

1 Like

Here a simple example:







readCSV.aia (2.5 KB)

1 Like

How many rows does your table have?

Are there any gaps between months in your table? (This makes turning months into indices harder)

Cool! How simple it is when you know how!
TIMAI2, this is awesome. Thanks a lot. This is what I needed. Thanks for the detailed analysis with an example. You are the best

For a compiled app, you may/will need read/write permissions if not already provided by the File component.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.