Enum MergeEmptyTdType

MergeEmptyTdType enumeration

Represents the merge type for empty TD element when exporting file to html.

public enum MergeEmptyTdType

Values

NameValueDescription
Default0Display like MS Excel.
None1Empty TD elements will not be merged when exporting file to html. This will generate a significantly larger html file.
MergeForcely2Merging empty TD element forcedly when exporting file to html. The size of html file will be reduced significantly after setting value to true. If you want to import the html file to excel or export perfect grid lines when saving file to html, please keep the default value.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

    public class MergeEmptyTdTypeDemo
    {
        public static void MergeEmptyTdTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            // Add some data to the worksheet
            worksheet.Cells["A1"].PutValue("Data1");
            worksheet.Cells["B1"].PutValue("Data2");
            worksheet.Cells["C1"].PutValue("Data3");

            // Create HtmlSaveOptions and set the MergeEmptyTdType property
            HtmlSaveOptions saveOptions = new HtmlSaveOptions();
            saveOptions.MergeEmptyTdType = MergeEmptyTdType.MergeForcely;

            // Save the workbook to HTML format
            workbook.Save("MergeEmptyTdTypeExample.html", saveOptions);

            Console.WriteLine("HTML file saved with MergeEmptyTdType.MergeForcely option.");
        }
    }
}

See Also