You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Mahaveer <ma...@apple.com> on 2013/07/17 12:55:08 UTC

Unable to upload the file

Hi ,

I am trying to upload an excel file through my system but unable to upload
it. I am using the below POI jars. I have tried with excel version 2007 and
2010 also. Its failing on the below line, 

WorkbookFactory.create(InputStream);

poi-3.7-20101029.jar
poi-ooxml-3.7-20101029.jar
poi-ooxml-schemas-3.7-20101029.jar
poi-scratchpad-3.7-20101029.jar


Is this issue related to system microsoft version or the language in which
the microsoft version is present?
As i am uploading the same jar with other systems it is working fine.

Can anybody please help me.

Regards
Mahaveer



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Unable-to-upload-the-file-tp5713249.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Amar Sheth <sh...@gmail.com>.
It worked for my the following method
I used java servlet to upload the file and got the file path. Then I used
poi with file on the server to do the processing.


On Wed, Jul 17, 2013 at 4:35 PM, Nick Burch <ap...@gagravarr.org> wrote:

> On Wed, 17 Jul 2013, Mahaveer wrote:
>
>> I am trying to upload an excel file through my system but unable to upload
>> it. I am using the below POI jars. I have tried with excel version 2007
>> and
>> 2010 also. Its failing on the below line,
>>
>> WorkbookFactory.create(**InputStream);
>>
>
> How is it failing? What with? Error+stacktrace would help...
>
> Nick
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.**org<us...@poi.apache.org>
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: Unable to upload the file

Posted by Mahaveer <ma...@apple.com>.
Hi All,

Actually the issue was with firewall setting. So it was not allowing to
upload the excel sheet.

Thanks again
Mahaveer



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Unable-to-upload-the-file-tp5713249p5713709.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Mahaveer <ma...@apple.com>.
Hi All,

Actually the issue was with firewall setting. So it was not allowing to
upload the excel sheet.

Thanks again
Mahaveer



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Unable-to-upload-the-file-tp5713249p5713710.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 17 Jul 2013, Mahaveer wrote:
> If it is corrupt upload process then it should not happen on other 
> machines. But it is successfully uploading on other machines.

You will most likely need to ask questions on the mailing lists/forums of 
whatever framework you are using for the upload. Your problem is that 
something you are doing is corrupting your file before it gets to POI, and 
there's not a lot we can help you with on that from the POI side.

(Hint - if the checksum of your file changes at some point between it 
leaving excel and getting to POI, something has gone wrong!)

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Mahaveer <ma...@apple.com>.
HI Nick,

If it is corrupt upload process then it should not happen on other machines.
But it is successfully uploading on other machines.

I am saving the file as  Western European (Windows), and Western European
(ISO) and UNICODE

Excel from 2007 to 2010.

Nick, Do you think it is the issue while my file is getting saved? Or while
i am uploading it my system is changing some setting in excel format?

Regards
Mahaveer



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Unable-to-upload-the-file-tp5713249p5713262.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 17 Jul 2013, Mahaveer wrote:
> Please find the file. It is showing in .xls format to me.

Yup, that file is a valid .xls file. You must therefore be corrupting it 
in your upload process...

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Mahaveer <ma...@apple.com>.
Please find the file. It is showing in .xls format to me.


Shipments_Forecast-052813-0723.xls
<http://apache-poi.1045710.n5.nabble.com/file/n5713257/Shipments_Forecast-052813-0723.xls>  



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Unable-to-upload-the-file-tp5713249p5713257.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 17 Jul 2013, Mahaveer wrote:
> i am getting the following exception
>
> Your InputStream was neither an OLE2 stream, nor an OOXML stream.
>
> How can i know that what is type of input stream?

That indicates you have uploaded something that isn't an excel file. Could 
it perhaps be a .csv or a .html?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Mahaveer <ma...@apple.com>.
HI Nick,

i am getting the following exception

Your InputStream was neither an OLE2 stream, nor an OOXML stream.

How can i know that what is type of input stream?

Regards
Mahaveer



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Unable-to-upload-the-file-tp5713249p5713255.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to upload the file

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 17 Jul 2013, Mahaveer wrote:
> I am trying to upload an excel file through my system but unable to upload
> it. I am using the below POI jars. I have tried with excel version 2007 and
> 2010 also. Its failing on the below line,
>
> WorkbookFactory.create(InputStream);

How is it failing? What with? Error+stacktrace would help...

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org