cancel
Showing results for 
Search instead for 
Did you mean: 

Recording an checkpoint Integer variable to excel as a string?

SamuraiJack
Contributor

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 1
YMinaev
Staff

RE: Recording an checkpoint Integer variable to excel as a string?

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").

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors