Gerhard Weiss
Gerhard Weiss

Reputation: 9781

VB.NET Code to Change Excel 2007 Column Cell Format to Number no Decimal

VB.NET code to change Excel 2007 Column Cell Format from Text to a Number no Decimal.

Right now Column F shows values that look like
3E+13
3E+13

Manually changing it to a Number with No Decimal shows the correct value.
30000046605562
30000041582875

Of course I would like to automate this.

Upvotes: 1

Views: 6275

Answers (1)

2red13
2red13

Reputation: 11227

Select the rows (maybe programmatically) and perform

Selection.NumberFormat = "0"

To select all cells in the sheet call

Cells.Select

Upvotes: 4

Related Questions