Remove macro in open office calc

Hi,

So I have a ods file containing macro in it. After processing it through Aspose the macro is still there and hasMacro return false. Is there a way to remove it ?

What I observed is that I don’t see the macro when I open using ms excel but I do see it when I open using openoffice. So I want to know that if openoffice documents can contain macro or not. I using C# Apose cell v20.11.

Here’s the sample: sample_ods.zip (28.8 KB)

thanks

@zhilin39,

Yes, the ODS file contains macros when opening into openoffice. But when I tried opening the file into MS Excel 2013 and MS Excel 2016, it takes more CPU and consumes lot of memory to try to open into it and crashes MS Excel. I am afraid, Aspose.Cells does not support to manipulate macros in ODS files, so the macros would not be detected via Aspose.Cells APIs.

@Amjad_Sahi

Ok thank-you for your clarification. When I test macro in ODS and ODT, I do see macro removed after processing. So can I check does these two file type able to manipulate macros ? If able to, why HasMacros doesn’t return true if there’s macros exists in these two file types. thanks

@zhilin39,

I guess this was original requirements. Aspose.Cells does not include/parse macros in the ODS file when loading into Aspose.Cells object model. Do you need to log a ticket to detect if the ODS file has macros or not, we can do that upon your confirmation.

@zhilin39,
We have logged the issue as “CELLSNET-47749” in our database for removing ods macro in Workbook.RemoveMacro. Once we will have some news for you, we will update you in this topic.

@zhilin39,

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

@zhilin39,

Please try our latest version/fix: Aspose.Cells for .NET v20.11.6 (attached)
Aspose.Cells20.11.6 For .Net2_AuthenticodeSigned.Zip (5.4 MB)
Aspose.Cells20.11.6 For .Net4.0.Zip (5.4 MB)

Your issue should be fixed in it.

Let us know your feedback.

The issues you have found earlier (filed as CELLSNET-47749) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao