How to convert some cell as number in Excel into text?

Hello everyone,

I have a question about formatting excel cells in lotusscript. And I would like to change the category of cells from number/general to Text.

I got a feild :

.StaffCode(0) = 001111

I want to show all digits in the cell in excel. However it was changed by the default format of Excel and shown as 1111

nRow = nRow + 1

xlSheet.Cells(nRow, 1).value = .DeptCode(0)

xlSheet.Cells(nRow, 2).value = .StaffCode(0)

xlSheet.Cells(nRow, 3).value = .Staff(0)

xlSheet.Cells(nRow, 4).value = datekey + Cstr(h)

xlSheet.Cells(nRow, 5).value = skey


xlSheet.Cells(nRow, 1).category = text

I think the format should be like either these two forms.

The following is some of my fomatting codes.


With xlSheet

.PageSetup.LeftMargin = 32

.PageSetup.RightMargin = 32

.PageSetup.TopMargin = 36

.PageSetup.BottomMargin = 36	

.Range(.Cells(1,1),.Cells(1,5)).Font.bold = True

   .Range(.Cells(1,1),.Cells(1,5)).Font.Size = 11

   .Range(.Cells(1,1),.Cells(1,5)).Font.Name = "Cambria"				

Any help and suggestions are welcome and appreciate! Thanks in advanced!

Subject: Set the NumberFormat to display as text

Set the NumberFormat property of the Cell/range of cells to be “@”

This is the same thing as selecting the cell and choosing “text” as the cell format

Subject: put a single quote

so

xlSheet.Cells(nRow, 2).value = .StaffCode(0)

sb

xlSheet.Cells(nRow, 2).value =“'” & .StaffCode(0)