WorkbookDesigner does not set bean data appropriately

Our app works in a normal way to populate the spread sheet using ASPOSE. We use spread sheet templates that has a bunch of smart markers bonding with backing beans. The data for those beaning bean is retrieved by SQL queries running against database.

Recently, we are experiencing a wired issue is that, some time we just get empty spread sheet back which looks like beaning beans are not set with data. I tested our queries, they are all running good and do return the data, but some of them took long time to finish. So I was wondering is it the possible the reason?

Since we are ruining lot of this kind of process, we also use multi threads to run many processes at same time.

The following code is what we use to set data and I suspect the bean is empty before process it.

designer.setDataSource( beanKey.getKey(), bean );
designer.process();

Anybody can help me out? very much appreciated in advance!!

Hi,


Thanks for your posting and using Aspose.Cells.

If you are using multiple threads, then please do not share a single workbook object in multiple threads. It is OK, if a separate thread using separate workbook object, but if multiple threads are using a same workbook object, then it is not OK.

So,

Thread 1 should use Workbook A.
Thread 2 should use Workbook B
Thread 3 should use Workbook C

But it is not like

Thread 1 is using Workbook A
Thread 2 is using Workbook A
Thread 3 is using Workbook A

So, please make sure, a single workbook (object) is not being shared by multiple threads.


Hi thanks very much for your reply!


Multi-Thread I mean is to use different thread to process and set data to different sheet in one workbook.

Put it into more detail, I have one template which contains over 20 sheets and I am using multi-thread to get the data from the database, set the data into backing bean and then rendered the data through smart marker into the corresponding sheet.

Basically, I am using one thread to handle one sheet in the work book.

Thanks!

Hi,


Thanks for your posting and using Aspose.Cells.

Please process the worksheet one by one and not process multiple worksheets in multi-threads.

Please provide us some sample code to replicate your issue, because it will be hard for us to replicate the issue with mere description. And even if we replicate the issue with assumptions, the user original issue does not get fixed. Please provide your sample Excel files as well with your sample code.

We also request you to download and try the latest version and see if it makes any difference in the resolution of your issue. Let us know your feedback.

Download Link of Latest Version:


Hi!


Again, thanks very much for your reply!

please see the code snippet in the attachment

thanks!

Hi Also, I am trying to use the latest Aspose jar see if it can solve my problem but failed due to the license problem.


Our company does purchase the software, and I guess I need get the new version of Aspose.Cells.lic file right?

If I do, what information you need to get this file?

please let me know

thanks!

shuntian

Hi,


Thanks for your posting and using Aspose.Cells.

We have looked into your sample code but we are afraid, it is not runnable. There are lots of compile time errors. Please see the screenshot. We request you to provide us simple but runnable code which could help us look into your issue. Please also provide us your smart marker template file, your actual output Excel file and the expected Excel file. You can create your expected Excel file manually using Microsoft Excel.

For your license question, you can check the latest version behavior without setting the license, it will then work in evaluation mode which should also give the idea that it fixes the problem or not.

For license related questions, please post your questions in Aspose.Purchase forum.


Hi,


Thanks for using Aspose.Cells.

After looking into your issue further, we found your code is using multi-threads. We have mentioned previously that we do not support multi-threads for WorkbookDesigner. So, please remove multi-threads while processing smart markers.

Hi Thanks so much for keeping looking into my issue.


The code I provide is just the part that I think might cause the issue. Our app is too big to post here and it is not a stand along app. I just provide you a brief idea on how we are using multi-thread to process work book and excel ETC.

I will try to remove multi-thread part see if I get any luck.

thanks again

shuntian

Hi,


Thanks for your posting and considering Aspose.Cells.

I am afraid, we only need simplified code which could just focus on Aspose.Cells issue, therefore we need you to isolate it from your app and remove all the non-Aspose.Cells dependencies. However, the main cause of your issue is multi-threading, if you remove it, then WorkbookDesigner will work without any issue.