How do I generate a table from .csv?

Hello to all. I am new to the community, I would like to ask you a question immediately ...
I would like to populate a table from a .csv file as in the example file. can you help me?
Thanks, good job ...

1 Like

Hello Gianluca

That's a very clear explanation of what you are trying to do. However, the bad news is that there are display issues with the Table Component and so it is best not to use it. The alternatives:

  1. Horizontal Arrangements containing text boxes (= User Editable)
  2. Horizontal Arrangements containing labels (= Not User Editable)
  3. Web Component containing an HTML Table (= Not User Editable)
  4. 3rd Party Extension that provides a Table Component

There are two factors of interest:

  1. Is the data fixed (never changes) or dynamic (new data imported at intervals of time, be that minutes, hours, days, weeks etc)
  2. The in-App layout you propose is confusing - and difficult to set up/populate. Since the Table can be scrolled, you might consider presenting the data as it is in the CSV file.
1 Like

Perhaps look at @Ken's Tableview extension ?

1 Like

You could consider a javascript table... see Taifun Dynamic Table

Your app is simple.

Set up a stack of 8 Horizontal Arrangements HA1-HA6 in the Designer, width = Fill Parent, Height = Fill Parent

  • HA1: LabelID, Label??
  • HA2: empty Label
  • HA3: LabelPre1, LabelIn1, LabelOut1, LabelPost1
  • HA4: LabelLin1
  • HA5: empty Label
  • HA6: LabelPre2, LabelIn2, LabelOut2, LabelPost2
  • HA7: LabelLin2
  • HA8: ButtonPrev, ButtonNext

Assuming you have a Google Sheet loaded with just the 11 columns of data, download the csv and convert it into a table (list of lists).
The id number is the row number for the select row from table block.
Use 11 select item from row blocks to load your labels.
Use the two buttons to increment and decrement the row number.

I finally found the time to deepen your advice. thank you all, I will make good use of it ...
my main problem is to select the row of my interest from that table which contains 25 rows ...

... that can easily be done with an HTML table - but does the data (of the CSV) change from time to time or is it a one-off?

which one of the suggestions did you try?
my dynamic table example is able to return the index of the selected row

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Hi Gianluca

You never answered this question, the most important of all:

Is the data fixed (never changes) or dynamic (new data imported at intervals of time, be that minutes, hours, days, weeks etc)

i dati cambiano ogni 6 mesi, ma riga 1 e colonna 1 restano invariate

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