Reputation: 325
Is it possible to set the format for a cell/column in excel like shown in the image using EPPlus? What's the proper syntax to achieve that? The following code doesn't work.
worksheet.Cells[row, col].Style.Numberformat.Format = @"@"" Mhz""";
Upvotes: 0
Views: 387
Reputation: 4250
convert the value to string
worksheet.Cells[row, col].Style.Numberformat.Format = @"@"" Mhz""";
worksheet.Cells[row, col].Value = "10.5";
Upvotes: 1