I try to set cell format using AsposeCell API (C#):
var cell = worksheet.Cells[i, j];
Style style = cell.GetStyle();
style.Number = 21;
cell.SetStyle(style);
var time = new TimeSpan(1, 2, 3);
cell.PutValue(time);
This cell is displayed correctly, but has format: "all formats" (not "Time"). That is to say, style
property did not work. What's wrong?
Thank you!
Need to kindly convert TimeSpan string to proper data type when inputting into the cell via Aspose.Cells API.
It works now. May to use these cells as time cells (for example, to count sum or average)