Enum LineSpaceSizeType

LineSpaceSizeType enumeration

Represents the unit type of line space size.

public enum LineSpaceSizeType

Values

NameValueDescription
Percentage0Represents in unit of a percentage of the text size.
Points1Represents in unit of points.

Examples

using System;
using Aspose.Cells;
using Aspose.Cells.Drawing;
using Aspose.Cells.Drawing.Texts;

namespace AsposeCellsExamples
{
    public class TextsClassLineSpaceSizeTypeDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            
            // Access first worksheet
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Add a text box shape
            Shape textBox = worksheet.Shapes.AddTextBox(0, 0, 100, 100, 200, 200);
            
            // Set text content
            textBox.Text = "Sample Text\nSecond Line";
            
            // Access the first paragraph of the text box
            TextParagraph paragraph = textBox.TextBody.TextParagraphs[0];
            
            // Set space after size type to Points
            paragraph.SpaceAfterSizeType = LineSpaceSizeType.Points;
            
            // Set space after value (12 points)
            paragraph.SpaceAfter = 12;
            
            // Save the workbook
            workbook.Save("output.xlsx");
            
            Console.WriteLine("Text box with line spacing created successfully.");
        }
    }
}

See Also