We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Equivalent to TextFrame2.HasText Property


I want to know whether Aspose.Cells for .NET 18.x has the property like bellow, or not.

Because I want to check all the types of objects listed as follows whether it has text or not in a given input file.

If there’s no boolean property like above, to know whether a Shape object(or whatever object) has text or not,
I think I should simply go with this. Is there any better approach?

if ( shape.Text != null )
//do something for the shape has text
} else {
//do something for the shape doesn't

I checked the following conversation for the better understanding for myself. I found that Aspose.Words.Node.ToTxt() method was deprecated, and it has been merged into Node.ToString() method (As of Aspose.Words for .Net 18.6). Therefore I came to the above approach accessing shape.GetText(), which is supposed to meet the same demand, as well as in the other Microsoft Office operation (Cells/Slides).

I appreciate your kind advise.


I am afraid Shape class does not include a Boolean property to check existence of text and shape.Text property can be checked for null, as you have mentioned it in your code snippet.

Thanks for your prompt reply. I understand that!


You are welcome.