Be careful - files from the internet may contain viruses-Unless you need to edit-It's safer to stay in protected view

Hi

I am getting
Be careful - files from the internet may contain viruses,Unless you need to edit,It’s safer to stay in protected view

Warning message,
I have lot of files to be check
I can’t click Enable Editing button for every excel file.
Is there any option to avoid this message.
I need to be handle in the code only.Not through the trusted locations settings.

I am facing this issue when open with MS- EXCEL 2013 ,2016 (later) versions

Working fine for aspose version 7
facing issue with the aspose 8.3.0 and 8.8.0

Please help me how to solve it through the code

Below is my code snippet

Workbook workbook = new Workbook(fis);
Worksheet worksheet = (Worksheet)workbook.getWorksheets().get(0);
Cells cells = worksheet.getCells();
java.util.ArrayList dataAL = (java.util.ArrayList) getData();

for(int column=0;column<dataAL.size();column++){
cells.importArrayList((java.util.ArrayList)dataAL.get(column),0,column,true);
}
workbook.save(filledFileName,SaveFormat.XLSX);
File f = new File(filledFileName);
input = new BufferedInputStream(new FileInputStream(f));
byte[] buffer = new byte[10240];
for (int length; (length = input.read(buffer)) > 0;)
servletoutputstream.write(buffer, 0, length);
servletoutputstream.flush();
servletoutputstream.close();


thank you.

Hi,

Thanks for your posting and using Aspose.Cells.

The code you provided is simple but we are unable to run it because we don’t know what data you are importing to worksheet. Please provide us all the data which you are importing. You can provide it in an excel file in some worksheet. Or you can even hardcode your data in a sample code.

Please also provide us some of your source excel files (i.e fis in your code with which you are creating workbook objects) to test your issue. We will look into it and replicate the problem at our end and fix it.

Please also download and try the latest version:
Aspose.Cells for Java 8.8.2 and see if it makes any difference and resolves your issue. Let us know your feedback.

Hi,

Thanks for your posting and considering Aspose.Cells.

We have looked into your issue further and found, it is a default behavior of Microsoft Excel. Please create any excel file and upload it on internet and download it again and try to open it, you will get this same message.

So, you do not need to worry about it, because this message appears for any file regardless it contains viruses or not, whenever it is downloaded from internet.

If you do not want it, please follow these steps:

MS Excel -> File-> Options-> Trust Center-> Trust Center Settings-> Protected View-> Uncheck the first item

Thank You So much.