Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here


Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.


Have an account? Sign In Now

You must login to ask question.


Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this answer should be reported.

Sign InSign Up

eHowToNow Forum

eHowToNow Forum Logo eHowToNow Forum Logo

eHowToNow Forum Navigation

  • Home
  • Forum
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Meet The Team
  • Blog
  • About Us
  • Contact Us
Home/ Questions/Q 27386
Next
saravanavel
saravanavel

saravanavel

  • 3 Questions
  • 0 Answers
  • 0 Best Answers
  • 3 Points
View Profile
  • 0
saravanavel
Asked: June 30, 20212021-06-30T01:46:48+00:00 2021-06-30T01:46:48+00:00In: Java

org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException: The supplied data appears to be a raw XML file.

  • 0

I’m trying to parse a excel file using apache poi but I’m getting the error “org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException: The supplied data appears to be a raw XML file. Formats such as Office 2003 XML are not supported“. I research & found xls format not supported by StreamingReader. I saved my file to xlsx format but still I’m getting same error.

String name = “test.xls”;
File f = new File();
InputStream is = new FileInputStream(f);

Workbook workbook = StreamingReader.builder()
.rowCacheSize(100).bufferSize(4096).open(is);

Sheet sheet = workbook.getSheetAt(0);

Exception

Exception in thread “main” org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException: The supplied data appears to be a raw XML file. Formats such as Office 2003 XML are not supported
at org.apache.poi.openxml4j.opc.internal.ZipHelper.verifyZipHeader(ZipHelper.java:153)
at org.apache.poi.openxml4j.opc.internal.ZipHelper.openZipFile(ZipHelper.java:203)
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:140)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:272)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:181)
at com.monitorjbl.xlsx.impl.StreamingWorkbookReader.init(StreamingWorkbookReader.java:113)
at com.monitorjbl.xlsx.impl.StreamingWorkbookReader.init(StreamingWorkbookReader.java:91)
at com.monitorjbl.xlsx.StreamingReader$Builder.open(StreamingReader.java:251)
at com.publisher.main.ContentParser.main(ContentParser.java:22)

apache poiexcel parsingjava
  • 0 0 Answers
  • 20 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Stats

  • Questions 66
  • Answers 12
  • Best Answers 2
  • Users 32
  • Popular
  • Answers
  • smartrader

    com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of

    • 2 Answers
  • Vignesh

    How to delete unpushed changes in git

    • 2 Answers
  • shilpa

    How to split the String by space

    • 1 Answer
  • Newton Alarcao
    Newton Alarcao added an answer I have an additional question. In the problem I submitted… April 3, 2022 at 2:48 pm
  • Ganesh
    Ganesh added an answer How to apply created patch to new branch ? we… September 10, 2021 at 8:01 am
  • ehowtonow
    ehowtonow added an answer Delete the most recent commit without loosing your changes, use… September 10, 2021 at 6:52 am

Related Questions

  • Newton Alarcao

    Sudoku grid lines

    • 1 Answer
  • nancy

    Maven Compile failed with Source option 5 is no longer ...

    • 0 Answers
  • saravanavel

    java.lang.IllegalStateException: Cannot get a text value from a numeric cell

    • 0 Answers

Top Members

ehowtonow

ehowtonow

  • 1 Question
  • 53 Points
Teacher
Appu

Appu

  • 1 Question
  • 44 Points
Begginer
Newton Alarcao

Newton Alarcao

  • 1 Question
  • 21 Points
Begginer
MaheshKannan

MaheshKannan

  • 0 Questions
  • 20 Points
Begginer
Annamalai T

Annamalai T

  • 0 Questions
  • 20 Points
Begginer

Trending Tags

aadhar angular angularjs apache poi bufferedimage cmda core java database docker dtcp education encumbrance certificate excel parser excel parsing git government graphics2d gui hibernate how to draw thicker line to emphasize sudoku boxes jackson java java image java string jpa json k8s kubernetes material design maven medicine minikube orm pom xml ration card real estate regex regular expression trading vaccine version control xml xpath வில்லங்க சான்றிதழ்

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

eHowToNow Forum

eHowToNow.com forum is a social questions & Answers Engine which will help you establish your community and connect with other people.

About Us

  • Meet The Team
  • Blog
  • About Us
  • Contact Us

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2021 eHowToNow.com. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.