Forum Discussion

SamuraiJack's avatar
SamuraiJack
Contributor
15 years ago

Recording an checkpoint Integer variable to excel as a string?

The number in question is 0024248.. 



Currently using

dtaSheet.Cells(tcRw,"A") = aqConvert.VarToStr(page.PolNum.innerText)


Records in Excel as 24248.



Jack

1 Reply

  • Hi Jack,



    This behavior is normal (by default). To force MS Excel not to truncate zeros, you need to set the cell format to Text by using its NumberFormat propety (cell.NumberFormat = "Text").