F Fox Active Member Licensed User Longtime User Jan 23, 2013 #1 is it possible that i can read an random entry from an csv file... and write this result in an label... is here one that have an example for me how can i realize that?! Help would be nice.
is it possible that i can read an random entry from an csv file... and write this result in an label... is here one that have an example for me how can i realize that?! Help would be nice.
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2013 #2 You will need to read the complete file (with StringUtils) and then randomly choose one row. Upvote 0
E enonod Well-Known Member Licensed User Longtime User Jan 24, 2013 #3 This is what I used... Code: Dim sTest() as String ... Sub CSV Dim su As StringUtils Dim csv As List csv = su.LoadCSV(File.DirAssets, "tests.txt", ",") sTest = csv.Get(0) End Sub Tick the String utils Library in the IDE Libs tab Put the file in the Files folder under your project. Then in the main code, for example, access sTest(7) Last edited: Jan 24, 2013 Upvote 0
This is what I used... Code: Dim sTest() as String ... Sub CSV Dim su As StringUtils Dim csv As List csv = su.LoadCSV(File.DirAssets, "tests.txt", ",") sTest = csv.Get(0) End Sub Tick the String utils Library in the IDE Libs tab Put the file in the Files folder under your project. Then in the main code, for example, access sTest(7)