question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poiji.fromExcel mutates input file

See original GitHub issue

Poiji’s method fromExcel(final File file, final Class<T> type) mutates the input file. When I set the input file to be read only, this yields a PoijiException wrapping FileNotFoundException (permission denied)

Caused by: java.io.FileNotFoundException: <my-file-path> (Permission denied)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
	at org.apache.poi.openxml4j.opc.internal.FileHelper.copyFile(FileHelper.java:68)
	at org.apache.poi.openxml4j.opc.ZipPackage.closeImpl(ZipPackage.java:456)
	at org.apache.poi.openxml4j.opc.OPCPackage.close(OPCPackage.java:479)
	at com.poiji.bind.mapping.XSSFUnmarshallerFile.returnFromExcelFile(XSSFUnmarshallerFile.java:43)
	... 27 more

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mindyorcommented, Aug 7, 2018

Looks good to me!

1reaction
ozlerhakancommented, Aug 6, 2018

Hi @mindyor ,

I will try to fix it for the next release. Thank you for your support by showing this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Convert Excel Data Into List Of Java Objects : Poiji API
The requirement is working with excel either to generate reports or to take input data from excel. As a java developer, we should...
Read more >
Poiji (poiji 2.2.0 API) - javadoc.io
Method Summary ; static <T> List<T>, fromExcel(File file, Class<T> type, PoijiOptions options). converts excel rows into a list of objects.
Read more >
Why format changes while reading data from excel file using ...
I'm assuming you're using the cell method .getNumericCellValue() which returns a double - a double will always print at least 1 decimal.
Read more >
generator-jhipster-file-handling - npm
Installs entities and dependencies to enable reading from excel file data. Latest version: 1.1.1, last published: 2 years ago.
Read more >
Read Excel Cell Value Rather Than Formula With Apache POI
If we're working with an Excel file that is already saved and we're not going to make changes to that spreadsheet at runtime,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found