Free Support Forum - aspose.com

Finding cmd command in excel cell

Hi There,

i am having trouble with finding out =cmd formula in excel cell that can execute any exe file in windows.
For example, if you have "=cmd|’ /C calc’!A0 " in cell of excel file it executed the calc program.

I don’t want to visit cell by cell and find that text. could not attached the excel file but attached image of it for your reference.

we are trying to use this class but seems to be not working.
ExternalLink externalLink = workbook.Worksheets.ExternalLinks[0];

Check the property Type.Gettype

public ExternalLinkType Type { get; }

Find the type: DDELink = 0 or External = 1

Cell_having_cmd_Text.PNG (32.6 KB)

Thanks in Advanced.

Surendra Shrestha

@andy.a.kuan.wellsfar

Thanks for using Aspose APIs.

We have supported this feature in most recent versions. Please download and try the following latest version. It will work fine as shown in the following screenshot. Sample code is also given for your reference.

C#

Aspose.Cells.ExternalLink ddeLink = wb.Worksheets.ExternalLinks[0];

Screenshot: