New topic: 

Web: Export Listbox to .TXT

<http://forums.realsoftware.com/viewtopic.php?t=45705>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        alexandersazu          Post subject: Web: Export Listbox to 
.TXTPosted: Wed Oct 24, 2012 2:34 pm                         
Joined: Wed Oct 24, 2012 2:15 pm
Posts: 1                I have problem , i want to export the listbox a file 
.TXT  in the application for web   
                             Top                neonash7777          Post 
subject: Re: Web: Export Listbox to .TXTPosted: Wed Oct 24, 2012 3:14 pm        
                 
Joined: Mon Nov 29, 2010 7:01 pm
Posts: 292                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             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to