[]
Gets or sets whether columns are generated automatically when data is bound to the worksheet.
When this property is true, columns can be created automatically during data binding.
Use AutoGenerateColumns to change this setting before assigning or refreshing bound data.
bool AutoGenerateColumns { get; set; }
Property AutoGenerateColumns As Boolean
JsonDataSource dataSource = new JsonDataSource("[{\"name\":\"Jack\",\"age\":12},{\"name\":\"Alice\",\"age\":25}]");
worksheet.AutoGenerateColumns = true;
worksheet.DataSource = dataSource;
bool autoGenerateColumns = worksheet.AutoGenerateColumns;
int columnCount = worksheet.ColumnCount;
object firstName = worksheet.Range["A1"].Value;
object secondAge = worksheet.Range["B2"].Value;