Protected view after saving

Hello,

After saving the document in attachment using Aspose, we have the following error :
Protected view Office has detected a problem with this file.

Maybe because the document contains filters.

Aspose Cells version : 17.1.7

Java Code:
Workbook workbook = new Workbook(filepath);
workbook.save(tempFileName);

Thank you.

Hi,


Thanks for the template file and screenshot.

When I opened your template file “Filter.xls” into MS Excel 2010/2013 (MS Excel 2007 also shows data lost error), I got the same error, see the screenshot for your reference:
http://prntscr.com/e436lq

I have used the following sample code using your attached file with v17.1.7, it works fine and the output file is fine tuned:
e.g
Sample code:

Workbook workbook = new Workbook(“Filter.xls”);
workbook.save(“out1.xlsx”);

Could you open the attached output file into MS Excel manually if you still find this issue.

Thank you.

No error, but input file is an XLS, why do you save it as XLSX ?

Hi,


Ok, I did save to XLS file format now. I observed the issue as you mentioned by simply opening and re-saving your attached XLS file. I found the output file (attached) is opened in Protected view after re-saving the template file, see the screenshot of the output XLS file:
http://prntscr.com/e53xk5
e.g
Sample code:

Workbook workbook = new Workbook(“Filter.xls”);
workbook.save(“out1.xls”);

Please note and as I mentioned earlier when I opened your original template file “Filter.xls” into MS Excel 2010/2013 (MS Excel 2007 also shows data lost error) it gives similar Protected view error too. I have logged an investigation ticket with an id “CELLSJAVA-42181” for your issue. We will look into it soon.

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

Thank you.

Hi,


This is to inform you that we have fixed your issue “CELLSJAVA-42181now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Thank you.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v17.1.10 (attached).

We have fixed the issue “CELLSJAVA-42181” in it.

Let us know your feedback.

Thank you.

Hello,

This version works fine with my first document, thank you.

But I have the same issue after added a new sheet, with a graphic.

See the new document in attachment.

Hi,


Thanks for the new file.

You are right, I can still find the issue with your new file “Filter_2.xls”. I found the output file is opened in Protected view after re-saving it. I have reopened the issue “ELLSJAVA-42181” again. We will look into it soon.

Sorry for any inconvenience caused!

Hi,


This is to inform you that we have fixed your issue. We will soon provide/share the fix after performing QA by applying more measures and including other enhancements and fixes.

Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hello,

The issue is always present using SheeRender class.
It seems that it corrupts the document.

Java Code:
Workbook workbook = new Workbook(filepath);

for (int i = 0; i<workbook.getWorksheets().getCount(); i++) {
Worksheet worksheet = workbook.getWorksheets().get(i);
ImageOrPrintOptions printOpts = new ImageOrPrintOptions();
SheetRender sr = new SheetRender(worksheet, printOpts);
}

workbook.save(tempFileName);

Hi,


Thanks for providing sample code.

I could not reproduce the issue using your both template files (“Filter.xls” and “Filter_2.xls”) with the following sample code. The output file is fine and does not open in Protected View or is not corrupt.
e.g
Sample code:

//Workbook workbook = new Workbook(“Filter.xls”);
Workbook workbook = new Workbook(“Filter_2.xls”);

for (int i = 0; i<workbook.getWorksheets().getCount(); i++) {
Worksheet worksheet = workbook.getWorksheets().get(i);
ImageOrPrintOptions printOpts = new ImageOrPrintOptions();
SheetRender sr = new SheetRender(worksheet, printOpts);
}

workbook.save(“out1.xls”);

Do you use different file? If so, kindly attach the file, we will check it soon. Also provide your output (corrupt) file here.

Thank you.

Hello,

I added a sample file in attachment.

Thank you.


Hi,


Thanks for the template file.

You are right as I tested using the following sample code with your template file, I can still find the issue with your new file “Filter_3.xls”. I found the output file is opened in Protected view after re-saving it.
e.g
Sample code:

Workbook workbook = new Workbook(“Filter_3.xls”);

for (int i = 0; i<workbook.getWorksheets().getCount(); i++) {
Worksheet worksheet = workbook.getWorksheets().get(i);
ImageOrPrintOptions printOpts = new ImageOrPrintOptions();
SheetRender sr = new SheetRender(worksheet, printOpts);
}

workbook.save(“out1.xls”);

I have reopened the original issue “ELLSJAVA-42181” again. We will look into it soon.

We are sorry for any inconvenience caused!

Hi,


We found there is some strange data in your file. We recommend you to kindly forget your template file and re-create the template file using MS Excel.

Anyways, we have sorted out your issue now. We will share the fix once available.

Thank you.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v17.2.1.0 (attached).

Your issue should be fixed in it.

Let us know your feedback.

Thank you.

Perfect, it works fine.

Thank you!

Hi,


Thanks for your feedback.

Good to hear that your issue is sorted out by the new fix/version. Feel free to write us back if you have further comments or questions, we will be happy to assist you soon.

Thank you