InterruptMonitor doesn't work when XLSX has pivot table

Hi, I use InteruptMonitor to interrupt the method workbook.save(xlsx, SaveFormat.PDF).

When xlsx file has a pivot table, the save method works long after interrupt() was called. Is there a solution for this issue?

public static void main(String[] args) throws Exception {
	
	long start = System.currentTimeMillis();
	Workbook workbook = new Workbook(inF.getPath());
	
	final InterruptMonitor monitor = new InterruptMonitor();
	workbook.setInterruptMonitor(monitor);
	new Thread(new Runnable() {
	    public void run() {
	        try {
	            Thread.sleep(Math.round(Math.random() * 5000));
	        } catch (InterruptedException e) {
	        }
	        // Interrupt the process
	        monitor.interrupt();
	        System.out.println("Interrupting the save thread at "
	                + System.currentTimeMillis());
	    }
	}).start();
	try {
		System.out.println("Now convert");
		workbook.save(file, FileFormatType.PDF);
   		System.out.println("Converted in " + (System.currentTimeMillis() - start) + "ms");
	} catch (CellsException e) {
	    if (e.getCode() == ExceptionType.INTERRUPTED) {
	        System.out.println("The save thread interrupted in " + (System.currentTimeMillis() - start) + "ms");
	    } else {
	        throw e;
	    }
	}
}

The target xlsx with pivot is here: https://drive.google.com/file/d/0B_5EDDHi_y6Qb0IyUjRmTUhiRE0/view?usp=sharing

@vbex,

Thanks for the template file and sample code.

After an initial test, I observed the issue as you mentioned by using your sample code with your template file. I found that InterruptMonitor takes more time to interrupt the Workbook’s saving process for a large file having PivotTable in it. It always takes more than 30 seconds to terminate the process of saving to PDF file in this case, no matter what time I specify to sleep the thread. I tested using other scenarios/cases where it works fine though. We need to investigate the issue on our end. I have logged a ticket with an id “CELLSJAVA-42341” for your issue. We will look into it soon.

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

Thank you.

@vbex,

This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-42341”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Keep in touch.

Thank you.

Thank you for info. Please provide the version asap.

@vbex,

Hopefully we will share the fix/version here in the next couple of days or so.

Thank you.

@vbex,

Thanks for using Aspose APIs.

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

Thank you. After the fix it works as expected.

@vbex,

Good to know that your issue is sorted out by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

@Amjad_Sahi, after I ran other our tests with Cells 17.7.2, I got the following message

com.aspose.cells.CellsException: The subscription included in this license allows free upgrades until 2017-05-26, but this version of the product was released on 2017-07-27. Please renew the subscription or use a previous version of the product.

We use version 17.3.8. Could you provide a hotfix for our version?

@vbex,

No, we cannot include any fix or feature/enhancements to older version. The fixes are only based on the latest APIs set. In short, you got to use latest version/fix to figure out your issue.

Thank you.

@Amjad_Sahi, does it mean, that we have to pay for the new version, even if the bug was in old velsion, that we have purchased?

@vbex,

We are afraid, this forum is a technical forum and we answer technical queries here, it means, we are not right persons to ask this question. Besides, the information we have might be out-dated or wrong. We request you to post your question in Aspose.Purchase forum. Aspose.Purchase team will guide you better in this respect. Thanks for your understanding and have a good day.

@vbex,

I would like to add more. What is your current license expiry date? I guess your current license might work with v17.7.x. Please open your license file into notepad and check subscription expiry date (without editing any data in the file least your license file won’t work).

FYI, when you purchase a license for a product, you are authorized to use the license file with any new (and upcoming (official versions)) versions and hot fixes of the component for the next whole year. Moreover, your license will never expire if you continue to use your license with the product’s any version/hotfix that should be released before your subscription expiry date.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-42341) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

The issues you have found earlier (filed as CELLSJAVA-42341) have been fixed in Aspose.Cells for Java 17.8.