neoTable(csv) - Forum

Forum Navigation
You need to log in to create posts and topics.

neoTable(csv)

I have a spreadsheet file in the google drive by this path:

https://docs.google.com/spreadsheets/d/1AYHb9V6aR3nNimWi8tt0Xltphg48n_hqebBPlUD8uRM/edit#gid=0

I have put some data in there(You can check it out).

I have read and  stored the file's data in a variable by using this command:

FileToVar "https://docs.google.com/spreadsheets/d/1AYHb9V6aR3nNimWi8tt0Xltphg48n_hqebBPlUD8uRM/export?format=csv" [mydata]

What I want is how can I change this data([mydata]) in the form of a neoTable.

 

 

Hi @asmat,

Take a look at this post explaining how to export Google Spreadsheet data to JSON format.
Once done, it should be very simple to show it in a neoTable object.
Please don't forget to share your results here and let me know if you find any problem.

I have  solved The above problem by this way:

http://tinyurl.com/y2mt3vz8

In above The name of container is "View"

I have set for "file load button" the following code:

FileToVar "https://docs.google.com/spreadsheets/d/1AYHb9V6aR3nNimWi8tt0Xltphg48n_hqebBPlUD8uRM/export?format=csv" [file]
Watch [file] "TabConfig"

Then, I have set for "TabConfige" subroutine following code:

StrReplace "[file]" "\n" "," [Data] ""
StrParse "[Data]" "," [array]
ArrayLen [array] [len]
Math "([len])/4-1" 0 [length]
...............................
SetVar [c1] 0
SetVar [c2] 1
SetVar [c3] 2
SetVar [c4] 3
CreateEmptyArray [mydata]
...........................................................
Loop 0 [length] [i]
neoTableSetData [mydata] [i] "id" [array([c1])]
neoTableSetData [mydata] [i] "name" [array([c2])]
neoTableSetData [mydata] [i] "surname" [array([c3])]
neoTableSetData [mydata] [i] "age" [array([c4])] 
..............................................
SetVar [c1] [c1]+4
SetVar [c2] [c2]+4
SetVar [c3] [c3]+4
SetVar [c4] [c4]+4
EndLoop
........................................................................
neoTableResetColumns "View"
neoTableSetColumn "View" 1 "id" "آی دی نمبر" "" true false false ""
neoTableSetColumn "View" 2 "name" "نام" "" true false false ""
neoTableSetColumn "View" 3 "surname" "نام پدر" "" true false false ""
neoTableSetColumn "View" 4 "age" "سن" "" true false false ""
neoTableInitTable "View" "" 0 "Table" false false false false false ""
neoTableLoadData "View" [mydata]

 

Is this a logical way?

 

Very good @asmat!
As far as I know you have been the first human all over the world using Google Spreadsheets data within VisualNEO Web :)

Vadim and asmat have reacted to this post.
Vadimasmat

hi asmat

i use your code but not work for me and not show any table

mamnoon

 

Please look at this:

https://tinyurl.com/yxq4ba9l

Vadim and Peter have reacted to this post.
VadimPeter