Free Support Forum - aspose.com

Cell Styles

Hi There,


I am using the latest version of Aspose.Cells to create excel files in my VB.Net web app. I ran into an issue where my date columns were not formatting correctly. I searched the forum and found out how to set each cell’s style number and it is working but I have 2 questions:

  1. Is there an Enum that represents all the style numbers?
  2. Is there a way to set the style for an entire column instead of doing it for each cell?

This is what I am currently doing:

Dim cellStyle As Style = sheet.Cells(rowIndex, columnIndex).GetStyle()
cellStyle.Number = 22
sheet.Cells(rowIndex, columnIndex).SetStyle(cellStyle)

Hi,

Please see the sub-documents for a help under this link.

Working with Data Formatting

Hi,


1) You may set style using built-in style formats or custom style formats. For built-in style formats, you may set certain values for certain number formats, see the document and especially the table under sub-topic: “Using Built-in Number Formats”:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/setting-display-formats-of-numbers-dates.html

2) See the document on how to format rows and columns:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/formatting-rows-columns.html


Thank you.