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

Free Support Forum - aspose.com

Conversion from xlsb to xlsm RANDBETWEEN function problem

Hi,

As i observed that while conversion of .xlsb to .xlsm Aspose.Cells java not reading the RANDBETWEEN function applied cell full formula from .xlsb excel. Please find the example below.

Formula appled on .xlsb is =CHOOSE(RANDBETWEEN(1,3),C61,C62,C63)&CHOOSE(RANDBETWEEN(1,4),C65,C66,C67,C68)

Aspose.Cell java redaing above formula as:
=1CHOOSE(3,C61,C62,C63)1&CHOOSE(4,C65,C66,C67,C68)

Please provide solution on this.

@swamyMora,

Thanks for your query.

Please provide us your template XLSB file and output XLSM file. Also paste your sample code that we can use to reproduce the issue. We will check it soon.

Thank you.

XlsbTest.zip (1.7 MB)

Thanks for the reply.

Attached xlsb and xlsm files. Please refer sheet “Word ramp creator” which is causing error.

The code am using to convert .xlsb to .xlsm as below

FileInputStream fileInputStream = new FileInputStream( “D:\Swamy\XlsbTest\FL_Lake City_816146_wtrswr_10252016_Xlsb.xlsb” );
LoadOptions opts = new LoadOptions( LoadFormat.XLSB );
Workbook workbook = new Workbook( fileInputStream, opts );

FileOutputStream fileOutStream = new FileOutputStream( "D:\\Swamy\\XlsbTest\\FL_Lake City_816146_wtrswr_10252016_Xlsm.xlsm" );
workbook.save( fileOutStream, SaveFormat.XLSM );

@swamyMora,

Thanks for the sample code and template files.

I did evaluate your issue a bit using your sample code and template file. I found that the formulas in “Word ramp creator” are removed when opening the output file “FL_Lake City_816146_wtrswr_10252016_Xlsm.xlsm” into MS Excel. Do you confirm this issue? Also, I found the output XLSM file (by Aspose.Cells) is corrupted as when we open it into MS Excel, it pops us the error messages. Please confirm so we could log appropriate ticket(s) into our database for a fix.

Thank you.

Thanks for the co-operation.

Yes. After conversion from xlsb to xlsm due to NOT reading of RANDBETWEEN function applied formula of cell file got corrupted. That is why while opening it asks to recover.

After recovery of xlsm file we did not see formulas in “Word ramp creator” sheet.

This is the issue we are facing from last couple of days. As per my thought Aspose.Cell java NOT reading the RANDBETWEEN function applied formula of cell from xlsb excel.

Please look into and provide us the solution.

Thank you…

@swamyMora,

Thanks for your confirmation.

I have logged a ticket with an id “CELLSJAVA-42354” for your issue. Our concerned developer from product team will evaluate your issue to figure it out soon.

Once we have an update on it, we will let you know here.

Thank you.

@swamyMora

Thanks for using Aspose APIs.

Please download and try the following fix and let us know your feedback.

Perfect. Thank you very much.

Issue resolved. now am able to successfully convert xlsb to xlsm file without any errors.

@swamyMora

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.