Applying text format to a column also sets the format to the next column.
This happens when the columns have a size different from the default and two consecutive columns with different format also have the same size. This can be worked around with a slight change in the column sizes:
int columnCount = worksheet.UsedCellRange.ColumnCount;
for(int i = 1; i < columnCount; i++)
{
ColumnWidth colWidth = worksheet.Columns[i].GetWidth().Value;
if(colWidth.Value != SpreadsheetDefaultValues.DefaultColumnWidth)
{
ColumnWidth previousColWidth = worksheet.Columns[i - 1].GetWidth().Value;
if(colWidth.Equals(previousColWidth))
{
worksheet.Columns[i].SetWidth(new ColumnWidth(colWidth.Value + 1, colWidth.IsCustom));
}
}
}