Dear Aspose,
I can't find the property NumberType?
In examples I see the property
cell = cells["B31"];
cell.PutValue(DateTime.Now);
cell.NumberType = NumberType.EasternTime5;
cell = cells["B32"];
cell.PutValue(DateTime.Now);
cell.NumberType = NumberType.EasternTime6;
Hope you can help me.
Martijn
Hi Martijn,
Well, NumberType is a property in Aspose.Cells.GridWeb.Data namespace related the GridWeb control and not regarding Aspose.Cells library, see the API Reference: http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/aspose.cells.gridweb.data.numbertype.html (these are the built-in number formats for the control). Your example uses Aspose.Cells.GridWeb APIs.
I think you are using or you want to use Aspose.Cells component to manipulate excel files, so you must use Aspose.Cells APIs. For setting number formats you must utilize APIs in Aspose.Cells namespace.
See the following documents for your reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/setting-display-formats-of-numbers-dates.html
You may see the following video tutorials too:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/set-display-formats-of-numbers-and-dates.html
You can also check the demo too:
Thank you.