2017년 1월 12일 목요일

How to use a csv excel file to get information and display it for user


I have an Excel .csv file that I want to connect to my appinventor app. I want to make it so specific cells in the excel file get shown in the app. I was wondering how the user can choose something that they want and labels get filled in based on the cells that were chosen. I have linked my app inventor app and my .csv file. I have buttons that the user clicks, and based on what they click, I want them to change labels on a different screens. This is for a computer science class. (P.S. if you look at my blocks on the BookInfo screen, it is filled with stuff. DOn't worry, i am not using that.) Also, don't worry about the Screen1. I am not using that screen, and I am going to merge it with another app.


--
I still do not understand. I am not trying to add anything to the table, just trying to read from it, and get a specific value. I am not sure what a dynamic table layout is.

-- 
that solution is to display a complete csv table in the webviewer
I was wondering how the user can choose something that they want and labels get filled in based on the cells that were chosen

in this case first read your csv file using the file component and convert it into a list of lists 
then choose the row (i.e. select the sublist from the main list) and after that the items of that row you like to display (i.e. select an item from the sublist)
see also

-- 
I am sorry if I am asking too many questions, because I am a middle schooler and I am doing a project for computer science class.

How would I convert the file into lists?


Would I use a list from csv table block? How would I convert all the columns (7) and rows (80) to lists, would I use multiple variables

The image that I linked is wha I did. It is really simple, and it porbably does not work. How would I make it so it does work?

I looked at tutorials on youtube, but they were not in english

-- 
you screenshot looks fine, do you get an error message?
make sure, the file name is correct...

--
 
You can just use list from csv table block.
As Taifun mentioned, its better to store the csv in a file 

-- 
Ok thanks, it works but when it displays, it is all together and bunched up for the user. How do I make it so it is more visually appealing to see?

-- 
I want to have separate lables so that seperate pieces of info get shown 

Take a look at the screenshot, how would I make the info show up on different labels?

Screenshot_2016-04-16-15-39-50.png
--
as already said: in this case first read your csv file using the file component and convert it into a list of lists 
then choose the row (i.e. select the sublist from the main list) and after that the items of that row you like to display (i.e. select an item from the sublist)
see also



you will have to learn how to work with lists and list of lists...

--
--
thanks fam it worked and I understand

-- 


댓글 없음:

댓글 쓰기