Enum HtmlOfficeMathOutputType

HtmlOfficeMathOutputType enumeration

Represents how export OfficeMath to HTML.

public enum HtmlOfficeMathOutputType

Values

NameValueDescription
Image0Converts OfficeMath to HTML as image specified by <img> tag.
MathML1Converts OfficeMath to HTML using MathML.

Examples

namespace AsposeCellsExamples
{
    using Aspose.Cells;
    using Aspose.Cells.Rendering;
    using System;

    public class CellsClassHtmlOfficeMathOutputTypeDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Add OfficeMath to cell A1
            worksheet.Cells["A1"].PutValue("=SUM(1,2)");
            
            // Create HTML save options
            HtmlSaveOptions saveOptions = new HtmlSaveOptions();
            
            // Set OfficeMath output type to Image
            saveOptions.OfficeMathOutputMode = HtmlOfficeMathOutputType.Image;
            
            // Save with Image output type
            workbook.Save("HtmlOfficeMathOutputType_Image.html", saveOptions);
            
            // Change output type to MathML
            saveOptions.OfficeMathOutputMode = HtmlOfficeMathOutputType.MathML;
            
            // Save with MathML output type
            workbook.Save("HtmlOfficeMathOutputType_MathML.html", saveOptions);
        }
    }
}

See Also