You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Prashant Naik <pr...@gmail.com> on 2024/02/16 06:02:50 UTC
apache poi 5.2.5 not working
Hi Team,
I have been using apache poi for a long time. I am using apache poi 5.2.2
version for generating spreadsheets which is working perfectly fine for me.
I see there is a new version released 5.2.5 which I upgraded with its
dependencies. But it does not seem to be working for me. Your help is much
appreciated. I am pasting the below code. Please let me know what is
wrong with it.
Issue is when I run this program it does not throw any exceptions. But
everything works fine with 5.2.2
Java version: 8
- Upgrade commons-io dependency to 2.15.0
- Upgrade commons-compress dependency to 1.25.0
- Upgrade log4j-api dependency to 2.21.1
- Upgrade xmlbeans dependency to 5.2.0
*import java.io.*;import java.util.*;import java.text.*;import
org.apache.poi.ss.util.CellRangeAddressBase;import
org.apache.poi.ss.util.CellRangeAddress;import
org.apache.poi.openxml4j.util.ZipSecureFile;import
org.apache.poi.ss.usermodel.*;import org.apache.poi.ss.util.CellUtil;import
org.apache.poi.ss.util.RegionUtil;import
org.apache.poi.xssf.usermodel.XSSFSheet;import
org.apache.poi.xssf.usermodel.XSSFWorkbook;import
au.com.bytecode.opencsv.CSVReader;import
org.apache.poi.xssf.streaming.SXSSFWorkbook;*
*public static SXSSFWorkbook oWorkbookInter = null;*
*ZipSecureFile.setMinInflateRatio(0.0); try {
oWorkbookInter = new SXSSFWorkbook(200000);*
* }*
*catch(IOException oEx) { System.out.println(oEx);
oEx.printStackTrace(); System.exit(-1); }*
Re: apache poi 5.2.5 not working
Posted by Dominik Stadler <do...@gmx.at.INVALID>.
Hi,
The sample-code above does not close the workbook and does not seem to
write the file so it likely is not sufficient to look at the 2nd problem
that you report.
Please create a bug report at https://bz.apache.org/bugzilla/ and attach
the full minimal reproducing code and both the spreadsheet from 5.2.2 and
from 5.2.5 so we can take a look.
Thanks... Dominik.
On Fri, Feb 16, 2024 at 11:43 AM Prashant Naik <pr...@gmail.com>
wrote:
> Hi Team,
> Please ignore my previous email. My program is getting compiled and I am
> able to generate spreadsheets. But now the issue is spreadsheets are
> getting corrupted and the file size is increased as compared to previous
> version of apache poi 5.2.2. Can you please help me on this.
>
> Thank you,
> Prashant.
>
> On Fri, Feb 16, 2024 at 11:32 AM Prashant Naik <pr...@gmail.com>
> wrote:
>
> > Hi Team,
> > I have been using apache poi for a long time. I am using apache poi 5.2.2
> > version for generating spreadsheets which is working perfectly fine for
> me.
> > I see there is a new version released 5.2.5 which I upgraded with its
> > dependencies. But it does not seem to be working for me. Your help is
> much
> > appreciated. I am pasting the below code. Please let me know what is
> > wrong with it.
> > Issue is when I run this program it does not throw any exceptions. But
> > everything works fine with 5.2.2
> >
> > Java version: 8
> >
> > - Upgrade commons-io dependency to 2.15.0
> > - Upgrade commons-compress dependency to 1.25.0
> > - Upgrade log4j-api dependency to 2.21.1
> > - Upgrade xmlbeans dependency to 5.2.0
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > *import java.io.*;import java.util.*;import java.text.*;import
> > org.apache.poi.ss.util.CellRangeAddressBase;import
> > org.apache.poi.ss.util.CellRangeAddress;import
> > org.apache.poi.openxml4j.util.ZipSecureFile;import
> > org.apache.poi.ss.usermodel.*;import
> org.apache.poi.ss.util.CellUtil;import
> > org.apache.poi.ss.util.RegionUtil;import
> > org.apache.poi.xssf.usermodel.XSSFSheet;import
> > org.apache.poi.xssf.usermodel.XSSFWorkbook;import
> > au.com.bytecode.opencsv.CSVReader;import
> > org.apache.poi.xssf.streaming.SXSSFWorkbook;*
> >
> >
> > *public static SXSSFWorkbook oWorkbookInter = null;*
> >
> >
> >
> >
> >
> >
> > *ZipSecureFile.setMinInflateRatio(0.0); try {
> > oWorkbookInter = new SXSSFWorkbook(200000);*
> > * }*
> >
> >
> >
> >
> >
> >
> >
> > *catch(IOException oEx) { System.out.println(oEx);
> > oEx.printStackTrace(); System.exit(-1); }*
> >
> >
> >
>
Re: apache poi 5.2.5 not working
Posted by Prashant Naik <pr...@gmail.com>.
Hi Team,
Please ignore my previous email. My program is getting compiled and I am
able to generate spreadsheets. But now the issue is spreadsheets are
getting corrupted and the file size is increased as compared to previous
version of apache poi 5.2.2. Can you please help me on this.
Thank you,
Prashant.
On Fri, Feb 16, 2024 at 11:32 AM Prashant Naik <pr...@gmail.com>
wrote:
> Hi Team,
> I have been using apache poi for a long time. I am using apache poi 5.2.2
> version for generating spreadsheets which is working perfectly fine for me.
> I see there is a new version released 5.2.5 which I upgraded with its
> dependencies. But it does not seem to be working for me. Your help is much
> appreciated. I am pasting the below code. Please let me know what is
> wrong with it.
> Issue is when I run this program it does not throw any exceptions. But
> everything works fine with 5.2.2
>
> Java version: 8
>
> - Upgrade commons-io dependency to 2.15.0
> - Upgrade commons-compress dependency to 1.25.0
> - Upgrade log4j-api dependency to 2.21.1
> - Upgrade xmlbeans dependency to 5.2.0
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *import java.io.*;import java.util.*;import java.text.*;import
> org.apache.poi.ss.util.CellRangeAddressBase;import
> org.apache.poi.ss.util.CellRangeAddress;import
> org.apache.poi.openxml4j.util.ZipSecureFile;import
> org.apache.poi.ss.usermodel.*;import org.apache.poi.ss.util.CellUtil;import
> org.apache.poi.ss.util.RegionUtil;import
> org.apache.poi.xssf.usermodel.XSSFSheet;import
> org.apache.poi.xssf.usermodel.XSSFWorkbook;import
> au.com.bytecode.opencsv.CSVReader;import
> org.apache.poi.xssf.streaming.SXSSFWorkbook;*
>
>
> *public static SXSSFWorkbook oWorkbookInter = null;*
>
>
>
>
>
>
> *ZipSecureFile.setMinInflateRatio(0.0); try {
> oWorkbookInter = new SXSSFWorkbook(200000);*
> * }*
>
>
>
>
>
>
>
> *catch(IOException oEx) { System.out.println(oEx);
> oEx.printStackTrace(); System.exit(-1); }*
>
>
>