This content has been marked as final.
Show 1 reply
-
1. Re: Seam Upload File question
gebuh Nov 12, 2012 12:30 PM (in response to beastofbobmin)I do something similar with excel files. I use the apache poi(http://poi.apache.org/) api to extract data from the uploaded document. It works for excel and csv, not sure about txt, but I imagine that shouldn't be a problem.
I get the data from the attachement and convert it to a ByteArrayInputStream, use that to create a Workbook, get a sheet from it and then parse the data from the sheet into a list of objects.
This was my first attempt at it, so ymmv, but let me know if you need more detail.