Format all Cells in a Column as Text

Is there a way to format all of the cells in a column as Text? In Excel you can right-click the column header > Format Cells > Text. Is this possible in GemBox.Spreadsheet?


Yes, you can use this:

ExcelWorksheet worksheet = ...
worksheet.Columns["A"].Style.NumberFormat = "@";

Or this:

worksheet.Columns["A"].Style.NumberFormat = NumberFormatBuilder.Text();


1 Like

Thanks Mario. Worked like a charm.