Insertar mas columnas con datos exportados desde appinventor a csv sin que se sobreescriban los datos anteriores

Buen día estimados amigos, quiero pedirles por favor su colaboración y ayuda para solucionar un problema que tengo con mi aplicacion, les comento, tengo en la screen1 dos botones uno de importar y otro para exportar datos a CSV, el de importar funciona eficientemente, el de exportar también, sin embargo, cuando exporto solo lo hace a dos columnas una del nombre del estudiante y la otra con la asistencia para la fecha que se extrae del sistema, cuando exporto para otra fecha se sobre escribe los datos anteriores, quisiera lograr que los datos exportados en una fecha nueva se carguen al mismo archivo pero en la columna vacia de a lado y así sucesivamente con las fechas posteriores para tener una base de datos de los días que se pasa asistencia.

Les comparto el archivo. aia y un archivo .csv para que lo importen y a partir de este se puedan exportar y anexar los otros registros de días posteriores.

Control_asistencia.csv (153 Bytes)

Asistencia1.aia (11.5 KB)

Not sure to understand, this is the output file after I select the first name of the list and set “asiste” to no, what should the correct content be?

And the file generated should be used as input file in subsequent days?

Control_asistencia_out.csv (169 Bytes)

Here is a blocks image from your single screen app, for the board:

I see from your TinyDB usage that you defined two instances of TinyDB, but did not change their NameSpaces, so they operate from the same set of values and tags.

Is your app only intended to cover one class ?

This is an awful way to store your data, as far as efficient use of programmer time.

Nombre,4-8-2026
Nombre,3-8-2026
ARCOS LUCIA,no
ARMAS DAMARIZ,si
CALAN JOSUE,no
FLORES MAITE,no
HEREDIA KAREN,si
NARVAEZ STALIN,no
RUANO JHOSSELYN,si
VALENCIA VANESSA,no

A proper programmer would append daily attendance records to a single three column file, in the form
yyyyMMdd,name,yes/no
where yyyyMMdd is the class date, and name and yes/no are as you use them.

Using the date format yyyyMMdd allows for sorting and filtering chronoligically.

If you want the date to look nice on a display, reformat the internal data format to suit your tastes.

Storage is cheap, and programmer time is expensive.

Study the advanced list blocks at

si mi estimado amigo solo la clase de tutoría

Yes, my dear friend. I’m not an expert programmer, so I think this is the best approach for me: having the "name" and "date" fields, with a "yes/no" status field below the date. This makes it easy to generate reports and get a quick overview of the data using the TableViewer tool. I’ve attached the .aia file and a sample file showing how the data should be exported to work with that tool. Could you please help me figure out how to export the data exactly as shown in that CSV file? Thanks a lot in advance, my friend.

Asistenciaejemplo.csv.txt (577 Bytes)

Asistencia1.aia (45.4 KB)

Si mi amigo, el archivo se crea con un nombre especifico y a partir de este se deben guardar solo los datos de la columna de fecha en las celdas siguientes vacías del csv.

My cross language debugging skills are very weak and slow.

Is there any one online who can handle this in Spanish?

I'm looking at your CSV output, and I see it as hard to read both for humans and a program.

Nombre,03/08/2026,04/08/2026,05/08/2026,06/08/2026,07/08/2026,08/08/2026,09/08/2026
CARVAJAL EMILY,si,no,si,no,si,si,si
CUMBAJIN JACKELIN,si,no,no,no,si,si,si
GALLARDO JEREMIK,si,no,si,si,si,si,si
HEREDIA JAMES,si,no,si,si,si,si,si
HERNANDEZ JULIAN,si,no,no,no,si,si,si
MARTINEZ JUSTIN,si,no,no,no,si,si,si 
MARTINEZ KIMBERLY,si,no,no,no,si,si,si
PAILLACHO MAYENSY,si,no,no,no,si,si,si
PIARPUEZAN ADRIAN,si,no,no,no,si,si,si
RECALDE MARTIN,si,no,no,no,si,si,si
USIÑA ULISES,si,no,no,no,si,si,si
USUAY JOHN,si,no,no,no,si,si,si
VALENCIA JOHAN,si,no,no,no,si,si,si

If you were to attempt to load that CSV into a spreadsheet program, the human viewer of the sheet would have to fix the date header in place to allow scrolling to the right to spot particular student date activity, or alternatively, hide leading columns to get to a date while keeping the student name visible.

I like LibreOffice for my free open source desktop spreadsheet, by the way.
I have not checked to see if it supports freezing leading columns in addition to freezing header rows.

Regarding attendance application requirements, eventually you will have to sum up student absences by name. This Could be done programmatically from this CSV table, in a non-standard way, using the AI2 Length Of List block to avoid falling off the ends of the rows.

I am posting the internals of Screen1 here for upload by my Rosetta Stone app, to help me translate as I read your code.

(I hope the board allows my Rosetta app to read them.)
Screen1.scm.txt (7.2 KB)
Screen1.bky.txt (62.4 KB)

Y como podría modificar mis bloques para exportar de la forma que tu recomiendas es decir que se exporte

Fecha, nombre, Asistencia

03/08/2026, Ayala Juan, no

03/08/2026, Abarca Jose, si

04/08/2026, Ayala Juan, si

04/08/2026, Abarca Jose, si

05/08/2026, Ayala Juan, si

05/08/2026, Abarca Jose, si

Y así sucesivamente con el resto de 200 fechas que tiene el calendario escolar, si puedes por ayudarme con esa modificación de los bloques.

You first need to reverse your date format so that it can be sorted alpha-numerically

from 03/08/2026
to 2026-08-03

This aia project uses procedures to transpose your data to the format you want in your tableviewer display

attendance.aia (30.3 KB)

@ABG would do a better job!

This aia project shows you a method to enter the data, save to a list, save the list to tinydb, and store the list as a csv.

attendanceDataEntry.aia (4.3 KB)

If you want to use the csv file for data export and import:

attendanceDataEntry_csv.aia (4.4 KB)

I’d say you should explain a “little more” what you have to do.

From what you wrote it seems that:

  • you need an app to account for “asistencia” given to which student
  • this is done each day, on a single device ( as data is saved in a tinydb )
  • you need to export/import the whole data ( in csv form ) to view/edit on a pc/spreadsheet ( 200 columns after 200 days of data entered )
  • ….

I extended your app, using lists as you did ( but I’m quite sure that dictionaries would be a better/easier option )

P.S.

As noted by @ABG in libreoffice you can freeze the first column and row, useful when dealing with so many data

P.P.S

Forgot to add: if you need to count the “asistencias” for rows/columns a 0/1 would be easier to deal with

Asistencia2.aia (49.0 KB)

Control_asistencia_exp2.csv (711 Bytes)

1 Like

Excelente amigo mio, es justo lo que necesitaba te agradezco mucho, eres un genio. Le he hecho todas las pruebas y funciona correctamente, he modificado el archivo vacío solo con la lista e importa de manera correcta ademas que guarda de forma eficiente en la columna vacía de la derecha en la nueva lista, Dios te pague por la amabilidad y ayuda prestada amigo.

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