Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Dec 14, 2017 10:03 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Upload an excel spread sheet?
PostPosted: Thu May 23, 2013 7:48 pm 
Offline
User avatar

Joined: Wed Jul 07, 2010 2:55 pm
Posts: 720
Location: University Of Calgary, Faculty Of Medicine
I am writing a web application.
That application has a listbox with some columns of data.
I can manually add one row of text at time into the listbox with a dialog box or alternatively I've been asked if an excel spread sheet could be uploaded and then used to populate the listbox.

Any Idea how I can do this?

_________________
If at first you don't succeed... Try REALBasic and if that doesn't work try Xojo.


Last edited by BrianOBrien on Mon May 27, 2013 12:17 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Upload an excel spread sheet?
PostPosted: Fri May 24, 2013 8:53 am 
Offline
User avatar

Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1855
Location: Michigan, USA
The easiest thing to do would be to have your clients save their data as a CSV (which Excel can do) and upload that. Parsing through a CSV is pretty easy. Just make sure you use ReplaceLineEndings before parsing.

_________________
Windows 8 x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects: http://www.JasonTheAdams.com
"Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton


Top
 Profile  
Reply with quote  
 Post subject: Re: Upload an excel spread sheet?
PostPosted: Fri May 24, 2013 10:55 am 
Offline
User avatar

Joined: Wed Jul 07, 2010 2:55 pm
Posts: 720
Location: University Of Calgary, Faculty Of Medicine
True.. but I'm not quite sure I get how to use the WebFileUploader.

_________________
If at first you don't succeed... Try REALBasic and if that doesn't work try Xojo.


Top
 Profile  
Reply with quote  
 Post subject: Re: Upload an excel spread sheet?
PostPosted: Fri May 24, 2013 11:15 am 
Offline
User avatar

Joined: Fri Nov 10, 2006 4:10 pm
Posts: 1855
Location: Michigan, USA
Have you checked out the Examples/Web/Controls/WebFileUploader example?

_________________
Windows 8 x64
Windows XP Pro SP3
Ubuntu 11.04 via Virtual Box
RS Enterprise 2012r1.1

Programming Tutorials & Free Projects: http://www.JasonTheAdams.com
"Christianity has not been tried and found wanting; it has been found difficult and not tried." - G.K. Chesterton


Top
 Profile  
Reply with quote  
 Post subject: Re: Upload an excel spread sheet?
PostPosted: Mon May 27, 2013 12:17 pm 
Offline
User avatar

Joined: Wed Jul 07, 2010 2:55 pm
Posts: 720
Location: University Of Calgary, Faculty Of Medicine
Yes, I got the example code, but in the example code the WebFileUploader is on the web page... I need to 'pop it up' after a button is pressed, but perhaps that can't be done... unless I put it on a webContainerControl... that might work.

_________________
If at first you don't succeed... Try REALBasic and if that doesn't work try Xojo.


Top
 Profile  
Reply with quote  
 Post subject: Re: Upload an excel spread sheet?
PostPosted: Mon May 27, 2013 1:34 pm 
Offline
User avatar

Joined: Tue Jan 04, 2011 3:02 am
Posts: 1236
Location: Jönköping, Sweden
Jason_Adams wrote:
The easiest thing to do would be to have your clients save their data as a CSV (which Excel can do) and upload that. Parsing through a CSV is pretty easy. Just make sure you use ReplaceLineEndings before parsing.


Or you can use xlsx2csv that will convert the uploaded xls file to a csv for you that you can parse like Jason said :)
https://github.com/dilshod/xlsx2csv

_________________
Image http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
Xojo Pro 2013r1


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group