Skip to main content
All docs
V20.2
.NET Framework 4.5.2+

OleFormat.ProgId Property

Returns the content type associated with the OLE object.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v20.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

string ProgId { get; }

Property Value

Type Description
String

A string that defines the OLE object’s content type.

Remarks

The following example uses the ProgId property to obtain an OLE object that stores spreadsheet data. The OleFormat.SaveAs method saves extracted data to a file.

using System.Linq;
using DevExpress.XtraRichEdit.API.Native;
// ...

Document document = wordProcessor.Document;
// Obtain an OLE object that stores spreadsheet data.
DevExpress.XtraRichEdit.API.Native.Shape embeddedObject = document.Shapes.FirstOrDefault(
    x => x.Type == DevExpress.XtraRichEdit.API.Native.ShapeType.OleObject &&
    x.OleFormat.InsertType == OleInsertType.Embedded &&
    x.OleFormat.ProgId == OleObjectType.ExcelWorksheet);

if (embeddedObject != null)
{
    // Save the OLE object's data as an XLSX document.
    embeddedObject.OleFormat.SaveAs("ExcelDocument.xlsx");
}
See Also