Due to project requirements, lowercase numbers must be converted to uppercase numbers. The following is the conversion method. I hope you can learn from it.
function int2chn(n)
dim i,j,k,strlen,retval,x,y,z,str
z=array(zero, one, two, three, four, five, six, seven, eight, nine)
y=array(,十,百,千)
x=Array(,million,billion,trillion)
strlen=len(n)
str1=n
for i= 1 to strlen
j=mid(str1,i,1)
retval=retval&z(j)
if j>0 then retval=retval&y((strlen-i) mod 4)'if greater than zero, add decimal characters
retval=replace(retval,z(0)&z(0),z(0))' There are two zeros and only one is left.
if ((strlen-i) mod 4)=0 and right(retval,1)=z(0) then retval=left(retval,len(retval)-1)'Add every four digits to advance
if ((strlen-i) mod 4)=0 then retval=retval&x(int((strlen-i)/4))'Remove the last zero
next
int2chn=retval
end function