Real Software Forums
http://forums.realsoftware.com/

Upload an excel spread sheet?
http://forums.realsoftware.com/viewtopic.php?f=23&t=47961
Page 1 of 1

Author:  BrianOBrien [ Thu May 23, 2013 7:48 pm ]
Post subject:  Upload an excel spread sheet?

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?

Author:  Jason_Adams [ Fri May 24, 2013 8:53 am ]
Post subject:  Re: Upload an excel spread sheet?

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.

Author:  BrianOBrien [ Fri May 24, 2013 10:55 am ]
Post subject:  Re: Upload an excel spread sheet?

True.. but I'm not quite sure I get how to use the WebFileUploader.

Author:  Jason_Adams [ Fri May 24, 2013 11:15 am ]
Post subject:  Re: Upload an excel spread sheet?

Have you checked out the Examples/Web/Controls/WebFileUploader example?

Author:  BrianOBrien [ Mon May 27, 2013 12:17 pm ]
Post subject:  Re: Upload an excel spread sheet?

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.

Author:  Akiland [ Mon May 27, 2013 1:34 pm ]
Post subject:  Re: Upload an excel spread sheet?

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

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/