We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue with .xlsb excel format (can't read xlsb for 2007)

Hi Team,


I am using aspose latest jar (aspose cells 8.3.0.2).
OS:Win7
Tool:IntelliJ

I have a problems. I can’t read my xlsb(convert for 2007 version , not 2003 version).
Using your example. Here is code.

String dataDir = “/home/”;
LoadOptions loadOptions1 = new LoadOptions(FileFormatType.XLSB);
Workbook workbook3 = new Workbook(dataDir + “XLSB2007.xlsb”, loadOptions1);


Error Message:

[10:35:32.297] Forcing GC due to low memory. 8 free bytes.
[10:35:32.663] Restarting due to low free memory. 419416 free bytes
closing server

java.lang.OutOfMemoryError: Java heap space
at com.aspose.cells.zaqa$za.a(Unknown Source)
at com.aspose.cells.zs.a(Unknown Source)
at com.aspose.cells.zaqa$zb.a(Unknown Source)
at com.aspose.cells.zf.b(Unknown Source)
at com.aspose.cells.zbbm.a(Unknown Source)
at com.aspose.cells.Row.a(Unknown Source)
at com.aspose.cells.Row.a(Unknown Source)
at com.aspose.cells.RowCollection.a(Unknown Source)
at com.aspose.cells.zbrd.a(Unknown Source)
at com.aspose.cells.zbrd.m(Unknown Source)
at com.aspose.cells.zbrd.a(Unknown Source)
at com.aspose.cells.zbpz.b(Unknown Source)
at com.aspose.cells.zbpz.a(Unknown Source)
at com.aspose.cells.zbpz.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at _jsp._test._test__jsp._jspService(Test/test.jsp:68)
at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
at com.caucho.jsp.Page.pageservice(Page.java:570)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179)
at com.nineder.web.filter.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:43)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:662)

thanks

Hi Peng,


Thank you for considering Aspose APIs, and welcome to Aspose.Cells support forum.

Please share your sample spreadsheet here for your investigation. Please also provide more details about your environment such as follow.

  1. Operating System Architecture (32bit/64bit)
  2. JDK version
  3. JDK type

Upon receiving the above requested, we will try to simulate the your environment to evaluate the presented scenario on our end.
Hi Team,

Thank you for your reply.

Here is environment.

Operating System Architecture (32bit/64bit):64bit
JDK version:JDK1.6
JDK type:J2SE

Thank you.

Hi,


Please also provide the underlying template XLSB file here, so we could evaluate your issue properly on our end.

Thank you.

Hi Team,


It’s upload this xlsb of compress to rar in attachment,

And update error message for jar(using aspose-cells-8.3.0.2 ).

thanks.

Hi Peng,

Thanks for your posting and using Aspose.Cells.

I was able to notice the problem with this file. But I found, it loads fine however it does not convert to PDF.

Could you please try the following code with the latest version: Aspose.Cells for Java 8.3.1 and let us know your finding.

Java


String filePath = “D:\Downloads\XLSB2007Test.xlsb”;


Workbook workbook = new Workbook(filePath);


System.out.println(“loaded”);

workbook.save(filePath + “.out.pdf”);

Hi team,

I using the jar for lastest version(Aspose.Cells for Java 8.3.1) and try this code,
but it couldn't loaded.


the following is error message of JAVA:

[08:55:40.795] Forcing GC due to low memory. 619752 free bytes.
closing server
[08:55:41.146] Restarting due to low free memory. 618512 free bytes
[08:55:41.148] Server[] stopping
[08:56:03.624] java.lang.OutOfMemoryError: Java heap space
[08:56:03.624] at java.lang.String.toLowerCase(String.java:2417)
[08:56:03.624] at java.lang.String.toLowerCase(String.java:2496)
[08:56:03.624] at com.caucho.vfs.FilePath.isAux(FilePath.java:506)
[08:56:03.624] at com.caucho.vfs.FilePath.canRead(FilePath.java:295)
[08:56:03.624] at com.caucho.vfs.Path.getCrc64(Path.java:1136)
[08:56:03.624] at com.caucho.server.deploy.ExpandDeployGenerator.getDigest(ExpandDeployGenerator.java:485)
[08:56:03.624] at com.caucho.server.deploy.ExpandDeployGenerator.isModified(ExpandDeployGenerator.java:294)
[08:56:03.624] at com.caucho.server.deploy.ExpandDeployGenerator.request(ExpandDeployGenerator.java:386)
[08:56:03.624] at com.caucho.server.deploy.ExpandDeployGenerator.handleAlarm(ExpandDeployGenerator.java:639)
[08:56:03.624] at com.caucho.util.Alarm.handleAlarm(Alarm.java:339)
[08:56:03.624] at com.caucho.util.Alarm.run(Alarm.java:309)
[08:56:03.624] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
[08:56:03.624] at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
[08:56:03.624] at java.lang.Thread.run(Thread.java:662)
[08:56:06.164] java.lang.OutOfMemoryError: Java heap space
[08:56:06.164] at java.lang.String.toLowerCase(String.java:2417)
[08:56:06.164] at java.lang.String.toLowerCase(String.java:2496)
[08:56:06.164] at com.caucho.vfs.FilePath.isAux(FilePath.java:506)
[08:56:06.164] at com.caucho.vfs.FilePath.canRead(FilePath.java:295)
[08:56:06.164] at com.caucho.vfs.Path.getCrc64(Path.java:1136)
[08:56:06.164] at com.caucho.server.deploy.ExpandDeployGenerator.getDigest(ExpandDeployGenerator.java:485)
[08:56:06.164] at com.caucho.server.deploy.ExpandDeployGenerator.isModified(ExpandDeployGenerator.java:294)
[08:56:06.164] at com.caucho.server.deploy.ExpandDeployGenerator.request(ExpandDeployGenerator.java:386)
[08:56:06.164] at com.caucho.server.deploy.ExpandDeployGenerator.handleAlarm(ExpandDeployGenerator.java:639)
[08:56:06.164] at com.caucho.util.Alarm.handleAlarm(Alarm.java:339)
[08:56:06.164] at com.caucho.util.Alarm.run(Alarm.java:309)
[08:56:06.164] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
[08:56:06.164] at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
[08:56:06.164] at java.lang.Thread.run(Thread.java:662)
[08:56:06.513] Host[] stopping

thanks
Hi team,

I reduce Capacity for xlsb in attachment .
Do first to start my server(resin3).
Display error message for java.

[11:03:21.416] Note: Recompile with -Xlint:deprecation for details.
[11:03:32.563] Forcing GC due to low memory. 476096 free bytes.
closing server
[11:03:32.907] Restarting due to low free memory. 903416 free bytes
[11:03:32.909] Server[] stopping
[11:03:50.267] Host[] stopping

Do second. once again start server.
It loaded , but saved to pdf for 30 min.

Finally,it always display this message "Java heap space".

thanks

Hi Peng,

Thanks for your feedback and using Aspose.Cells.

We were able to observe this issue after running the the sample code shared in my above post. We found that save to pdf gets stuck and memory keeps increasing causing out of memory error.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41131 - Save to PDF gets stuck and memory issue with the source XLSB file

Hi team,

Thank you for your reply.

But I just want reading string.
how can I get this string for this xlsb.

If I wish read string of xlsb,but always display "java.lang.OutOfMemoryError: Java heap space".

[14:10:38.959] Forcing GC due to low memory. 23648 free bytes.
[14:10:50.538] Forcing GC due to low memory. 310872 free bytes.
closing server
[14:10:50.888] Restarting due to low free memory. 310240 free bytes
[14:10:50.889] Server[] stopping
[14:10:58.456] java.lang.OutOfMemoryError: Java heap space
[14:10:58.456] at com.caucho.server.log.AccessLogBuffer.(AccessLogBuffer.java:72)
[14:10:58.456] at com.caucho.server.log.AccessLogWriter.write(AccessLogWriter.java:213)
[14:10:58.456] at com.caucho.server.log.AccessLogWriter.flush(AccessLogWriter.java:224)
[14:10:58.456] at com.caucho.server.log.AccessLog.flush(AccessLog.java:615)
[14:10:58.456] at com.caucho.server.log.AccessLog.handleAlarm(AccessLog.java:624)
[14:10:58.456] at com.caucho.util.Alarm.handleAlarm(Alarm.java:339)
[14:10:58.456] at com.caucho.util.Alarm.run(Alarm.java:309)
[14:10:58.456] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
[14:10:58.456] at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
[14:10:58.456] at java.lang.Thread.run(Thread.java:662)
Exception in thread "resin-destroy" java.lang.OutOfMemoryError: Java heap space
[14:12:15.573] java.lang.OutOfMemoryError: Java heap space
[14:12:15.573] java.lang.OutOfMemoryError: Java heap space
[14:12:15.573] java.lang.OutOfMemoryError: Java heap space
[14:12:15.574] java.lang.OutOfMemoryError: Java heap space
[14:12:15.574] java.lang.OutOfMemoryError: Java heap space
[14:12:15.574] java.lang.OutOfMemoryError: Java heap space
[14:12:15.574] java.lang.OutOfMemoryError: Java heap space
[14:12:15.576] java.lang.OutOfMemoryError: Java heap space
[14:12:15.576] java.lang.OutOfMemoryError: Java heap space


thank you

Hi Peng,

Thanks for your posting and using Aspose.Cells.

Actually, there is some issue of Aspose.Cells with your provided XLSB file. We have therefore logged an issue relating to it. Please spare us some time and let us investigate and fix this issue. Once, the issue is resolved, you will be able to run your code and get the string from your xlsb file.

Hi team,


Thank you for your reply.

Early I upload xlsb and you can load.

I add a new xlsb file to attachment.

Can you load this xlsb?

thanks.

Hi Peng,

Thanks for providing the new file and using Aspose.Cells.

XLSB2007TestNewS.xlsb does not load and keeps increasing memory consumption. We have tested this issue with the following sample code using the latest version: Aspose.Cells for Java 8.3.1.

We have also logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41134 - XLSB2007TestNewS.xlsb does not load and keeps increasing memory consumption.

Java

String filePath = “F:\Shak-Data-RW\Downloads\XLSB2007TestNewS.xlsb”;


Workbook workbook = new Workbook(filePath);


System.out.println(“loaded”);

Hi team,


Wish you an early correction.

Thank you.

Hi,

Thanks for using Aspose.Cells for Java.

We have fixed this issue.

  • CELLSJAVA-41134 - XLSB2007TestNewS.xlsb does not load and keeps increasing memory consumption

Please download and try this fix: Aspose.Cells for Java v8.3.1.1 and let us know your feedback.

Hi team,

Thanks your reply.
I use Aspose.Cells for Java v8.3.1.1 for XLSB2007TestNewS.xlsb,it’s still mistake.
XLSB2007TestNewS.xlsb still can’t load and keeps increasing memory consumption.


Error Message:
java.lang.OutOfMemoryError: Java heap space
at com.aspose.cells.zbpx.a(Unknown Source)
at com.aspose.cells.zbpx.b(Unknown Source)
at com.aspose.cells.zbpx.a(Unknown Source)
at com.aspose.cells.zbpx.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at _jsp._test._test__jsp._jspService(_test__jsp.java:209)
at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
at com.caucho.jsp.Page.pageservice(Page.java:570)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179)
at com.nineder.web.filter.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:43)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:662)

thank you

Hi Peng,

Thanks for your feedback and using Aspose.Cells.

You are right. We were able to generate this exception with the latest version 8.3.1.1.We have reopened this issue CELLSJAVA-41134 and logged your comments against it.

Hi Peng,

Thanks for using Aspose.Cells.

Please use memory preference as used in the the following code to get rid of the out of memory error.

Java


String filePath = “F:\Shak-Data-RW\Downloads\”;


LoadOptions options = new LoadOptions();


options.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);

Workbook workbook = new Workbook(filePath + “XLSB2007TestNewS.xlsb”,

options);

workbook.save(filePath + “out_java.xlsb”);


Also let us know your System Environment. OS, 32/64-bit, JDK etc. Please also let us know the xms and xmx settings found in your Eclipse.ini file.

Hi Team,


Thanks you reply.

If I add ‘setMemorySetting’ , I can load and save.

OS:win7/32
RAM:4G
JDK:1.6


I can’t found tfhe xms and xmx settings, if I found it, I will answer you.

I testing how can read xlsm for sheet data, if I have some question,I well ask you.


I use you code,and I add “initialize()” to release memory.

String filePath = “F:\Shak-Data-RW\Downloads\”;

LoadOptions options = new LoadOptions();

options.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);

Workbook workbook = new Workbook(filePath + “XLSB2007TestNewS.xlsb”,options);

workbook.save(filePath + “out_java.xlsb”);

workbook.initialize();

Thank you~

Hi Peng,

Thanks for your feedback and using Aspose.Cells.

It is good to know that you are now able to load and save using memory preference setting.

You will find xms and xmx settings inside the Eclipse.ini file like this

-Xms512m
-Xmx1024m

Thanks for letting us know your System Environment, we have logged it in our database. It will help us fix this issue.

If you want to release the memory, then just destroy the workbook object by setting all references to your workbook object with null. e.g

workbook = null;

It will release the memory consumed by workbook object.