Table of Contents

Class ExcelColumnWidthAttribute

Namespace
BigExcelCreator.ClassAttributes
Assembly
BigExcelCreator.dll

Specifies the width of an Excel column for a property.

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class ExcelColumnWidthAttribute : Attribute
Inheritance
ExcelColumnWidthAttribute
Inherited Members

Remarks

This attribute is used to define the column width when exporting data to Excel. The width value must be a non-negative integer.

Constructors

ExcelColumnWidthAttribute(int)

Initializes a new instance of the ExcelColumnWidthAttribute class.

public ExcelColumnWidthAttribute(int width)

Parameters

width int

The width of the Excel column. Must be non-negative.

Exceptions

ArgumentOutOfRangeException

Thrown when width is negative.

Properties

Width

Gets the width of the Excel column.

public int Width { get; }

Property Value

int