Hello,
the method InsertColumn(int, int, int) only copies style (background-color, border etc) from first cell. That means, that if you insert a new column, the colors from the first cell are applied to all bottom cells. I would expect/need that the style is applied for each cell seperately.
The method InsertRow applies the style for each cell, it's working fine.
I noticed that the concept in the Source Code to set the styles after inserting rows/columns are quite different.
Styles for new rows:
```
if (copyStylesFromRow > 0)
{
var cseS = new CellsStoreEnumerator<int>(_styles, copyStylesFromRow, 0, copyStylesFromRow, ExcelPackage.MaxColumns); //Fixes issue 15068 , 15090
while(cseS.Next())
{
for (var r = 0; r < rows; r++)
{
_styles.SetValue(rowFrom + r, cseS.Column, cseS.Value);
}
}
}
```
Styles for new columns:
```
if (copyStylesFromColumn > 0)
{
for (var c = 0; c < columns; c++)
{
var col = this.Column(columnFrom + c);
col.StyleID = this.Column(copyStylesFromColumn).StyleID;
}
}
```
Thanks in advance
the method InsertColumn(int, int, int) only copies style (background-color, border etc) from first cell. That means, that if you insert a new column, the colors from the first cell are applied to all bottom cells. I would expect/need that the style is applied for each cell seperately.
The method InsertRow applies the style for each cell, it's working fine.
I noticed that the concept in the Source Code to set the styles after inserting rows/columns are quite different.
Styles for new rows:
```
if (copyStylesFromRow > 0)
{
var cseS = new CellsStoreEnumerator<int>(_styles, copyStylesFromRow, 0, copyStylesFromRow, ExcelPackage.MaxColumns); //Fixes issue 15068 , 15090
while(cseS.Next())
{
for (var r = 0; r < rows; r++)
{
_styles.SetValue(rowFrom + r, cseS.Column, cseS.Value);
}
}
}
```
Styles for new columns:
```
if (copyStylesFromColumn > 0)
{
for (var c = 0; c < columns; c++)
{
var col = this.Column(columnFrom + c);
col.StyleID = this.Column(copyStylesFromColumn).StyleID;
}
}
```
Thanks in advance