Hi, I’ve a scenario where I upload the excel file and read the excel fril using apache poi. vaadin file upload is return outputstream where as apache poi is accepting input stream. How do I go about and resolve this issue.
Two possible solutions:
- Save it to a file and open it as inputstream
and (my favorite) - Use Piped Input/Outputstreams
http://ostermiller.org/convert_java_outputstream_inputstream.html
André
Hi,
For a previous post, I wrote a quick
example on github
of reading an uploaded CSV through the use of a temporary file.
Using a PipedInput/Ouput Stream - as André suggests - is more elegant.
Cheers,
Charles.
Thanks Charles and Andre.
I resolved by creating tempfile approach.
I felt second approach bit complicated.
Any working example for second approach is appreciated.
What library should I use to get it working?
I’ve downloaded javacsv.jar and linked it ot my project, but it doesnt seems to be working.
Hi, I’ve a scenario where I upload the excel file and save it in my data base throught a web site.
So what is the question?