Error reported opening XLS file in Excel 2010

The attached file was generated by .Cells 7.1.0.6. When opened in Excel 2010 it brings up a red error bar that says "Protected View. Office has detected a problem with this file. Editing it may harm your computer. Click for more details." However, when we tell it to allow editing anyway, the file seems perfectly operational, and we can save it as an XLS and open it again without any problem.

We have a suspicion that this may have something to do with validation. We have seen this problem when we put validation ranges on one worksheet but the validated cells on another. Apparently later versions of Excel (XLSX) allow this but Excel 2003 (XLS) does not. When this happened, we would get this notification on opening but ALSO an error on SAVING. Now that we've moved the validation ranges to the same sheet, the XLS we save is perfectly functional despite the warning on open.

We're afraid that this warning will scare our customers.

The Inputs sheet contains both the validated cells (e.g., H19:I24). These are being validated against $F$324:$F$327 on the same worksheet. The validation appears to work just fine.

Thanks,

--Howard

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version:
Aspose.Cells
for .NET v7.1.1.1

and let us know your feedback.

If the problem recurs, then please provide us your source xls/xlsx file and the sample code replicating the problem.

Thanks for the update. As you can see from the attached file, the error persists. I will try to come up with a small example but that may be difficult. In the meantime, could you take a look at the XLS file and see whether there's anything you can learn about it? Can you verify that you get the error/warning when you open it?

Thanks very much!

--Howard

Shakeel, I believe I've isolated the cause of the problem. It appears that there is a 33 character limit to the length of ErrorTitle in XLS format. XLSX format, at least in Excel 2010, doesn't have this limitation. If you write an XLS from .Cells with more than 33 characters in this field, then Excel 2010 will give a protection error when loading the file.

Ideally, it would be nice if you truncated these on output so as to not generate an illegal XLS, but at least we know what the problem is now.

Regards,
--Howard

Hi,

Thanks for your feedback. It is good to know that you are able to sort out this problem.

It could be a problem of format because xls format is an older format and xlsx format supports more feature.

If you find any other problem, please feel free to post, we will help you asap.

Shakeel,

We areencountering issue in this category. Please see the attached simple runnable proejct. Once the XLS file is generated, Office throws exception as Editing may harm your computer.

When XLSX file is generated, things are OK.

Please advise.

Arul

Hi,

Thanks for your posting and using Aspose.Cells.

After initial investigation, we were able to replicate this issue using the latest version: Aspose.Cells
for .NET v7.3.4.2


We have logged this issue in our database. We will look into this issue and fix it. Once the issue is fixed or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-41246.

I have attached the output files and screenshot illustrating this issue for a reference.


Screenshot:

Shakeel,

The link you posted for the new thread for the issue followup is broken. Can you please post the correct/working link?

Thanks

Hi,

Thanks for your posting and using Aspose.

Could you please elaborate yourself more. Did you mean this link: CELLSNET-41246?

This is actually a private link, it is not accessible to you but accessible to Aspose.Cells Support Developers only.

We use these links to log and track your issue requests and attach them with the relevant thread.

Once, we will have some update for you relating to this issue id, we will share it with you asap.

Arajaram:

Shakeel,

We areencountering issue in this category. Please see the attached simple runnable proejct. Once the XLS file is generated, Office throws exception as Editing may harm your computer.

When XLSX file is generated, things are OK.

Please advise.

Arul

Hi,

Thanks for your posting and using Aspose.Cells.

We have looked into your project and found, there is a little mistake that should be rectified.

Please change this line

opt.AddRange(CellArea.CreateCellArea(0, 0, maxRow, maxRow));

into this

opt.AddRange(CellArea.CreateCellArea(0, 0, maxRow, maxColumn));

It will resolve your issue. Please see the following screenshot for more help.

Screenshot:

Shakeel,

Thanks a lot for all quick responses and replies.

I missed out the typo from your code block for my previous fix.

It is working.

Arajaram:

Shakeel,

Thanks a lot for all quick responses and replies.

I missed out the typo from your code block for my previous fix.

It is working.

Hi,

Thanks for your posting.

If you encounter any other issue, please feel free to post, we will be glad to assist you further.

Have a good day.