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

Free Support Forum - aspose.com

How to read Math Type formulas from word document table?

How to read Math Type Formulas from word document table?

i am using asp.net with C#.

i am readin word document table and cell values from asp.net with C#, but Math Type formulas not reconginizing?

Aspose .net word compant will do this concept?

Please check attachement

I create Table in Word document and read the document from asp.net with C#.

Table cell have math type formulas .


Thanks for your request. In your case, formulas are embedded objects. You can use Shape.OleFormat to work with such objects. Please note, you can only extract data of OLE objects, but cannot update or create OLE objects:


Best regards,

thank for you support.

Table cell having Question text with math type formulas any where in the cells.

how to search shape.Oleformats in table cell ?

is it possibe to read the Question text and math type formulas in shape.olefomat at a time ?


Thanks for your request. No, unfortunately, there is no way to get text of the formula. You can only get raw data of the formula and the images that represents the OLE object in MS Word documents. Please see the following code:

// Open document.

Document doc = new Document(@"Test001\ShortAnswerTemplate.doc");

// Get all shapes in the documents (the same way, you can get shapes inside a particular cell).

NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);

int index = 0;

// Loop through all shapes and check whether they contain OLE data.

foreach (Shape shape in shapes)


if (shape.OleFormat != null)


// Save Ole data into a separate file.

shape.OleFormat.Save(string.Format(@"Test001\out_{0}.{1}", ++index, shape.OleFormat.SuggestedExtension));

// Save an image that is shown in MS Word.

shape.ImageData.Save(string.Format(@"Test001\out_{0}.{1}", index, shape.ImageData.ImageType));



Best regards,