I have c# code that programmatically inserts cells in spreadsheet. I am not able to set percetnage format for those cells:
Cell cell = OpenXmlHelper.GetCell(ws, address);
if (cell == null)
{
cell = InsertCellInWorksheet(ws, rowIndex, column);
}
cell.DataType = CellValues.Number;
cell.CellValue = new CellValue(value.ToString());
Instead of cell.DataType = CellValues.Number;
I need some code that sets Percentage
.
Can you give me some clues or tutorial on formatting percentage for excel cells in openxml?
Compared to Open Xml Excel set cell format to be Percentage I have number 0.08 and I need to show it as 8%.