Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Oct 13, 2019 7:37 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Web: Export Listbox to .TXT
PostPosted: Wed Oct 24, 2012 2:34 pm 
Offline

Joined: Wed Oct 24, 2012 2:15 pm
Posts: 4
I have problem , i want to export the listbox a file .TXT in the application for web


Top
 Profile  
Reply with quote  
 Post subject: Re: Web: Export Listbox to .TXT
PostPosted: Wed Oct 24, 2012 3:14 pm 
Offline
User avatar

Joined: Mon Nov 29, 2010 7:01 pm
Posts: 446
alexandersazu wrote:
I have problem , i want to export the listbox a file .TXT in the application for web



Loop through the listbox adding all of it's information to a string
dim s as string
For r as integer = 0 to lb.rowcount -1
dim row() as string
For c as integer = 0 to lb.columncount - 1
row.Append(lb.Cell(r,c))
Next
s = s + Join(row,",") + EndOfLine.Windows
Next



Then have the user download the file
file = new WebFile
file.mimetype = "text/plain"
file.forcedownload = true
file.Filename = "filenamehere"+".txt"
file.Data = stringWithDataInIt
showurl(file.url)

file should be a property on your page so that it stays around long enough for them to download it. You can add it to the session if you want them to be able to leave the page and continue downloading


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group