Display a random line from a sheet - NEED HELP

blackbrut

Regular Member
Joined
Mar 21, 2016
Messages
392
Reaction score
308
Hello guys,

I am looking for a solution (easiest = better) to display a random line from a sheet to a user with a URL.

Example:
User clicks on an URL -> It displays as a text a random line from a sheet.

The best would be an option that uses google sheet to display randomly a lien from a row. I can share this sheet with other users.

I am kinda confused because it seems so simple but I just can't find the magic tool. I was looking at only give the user a spintax text with all my line separate by | and end him to an output spintaxe that will display a random line.

(Not sure if it's the right sub-forum for this thread)
 
Guys,

Still have trouble to do this; Airtable doesn't seem to be what I really need because I have to add and contributor and it's not what I want.

Just pick up a random line from a csv or anything, and display it with a unique URL. (or a single URL that randomly redirects to the line)

What I need seem so simple and I can't figure it out, I feel so dumb.

Open to any help
 
Last edited:
Dont know any tools just basic programming.

You run a random method to return a number. As in the following example: https://www.w3schools.com/js/tryit.asp?filename=tryjs_random_1_100
Then you keep the cvs/text file open on your server and do a read line, if you're running ASP some C# would do:
Code:
string readline = File.ReadLines(FileName).Skip(X number of lines).Take(1).First();

Or since you got it all on cvs file just pass it onto a SQL db and do everything with javascript
 
Back
Top