how to convert numbers to letters

mounir_az

Member
Joined
Jan 11, 2009
Messages
18
Programming Experience
1-3
hi.

i want to know how to convert numbers to lettres.

thank you in advance.
 
Please explain. What is the purpose of your program? What is the range of the numbers? Are the numbers single-digit or multi-digit? What kind of letter do you want to replace with each number?
 
Do you mean you want to convert an ASCII (or Unicode) value to a character? The following code will return the character "A":

Dim ch As String
Dim anum As Integer
anum = 65
ch = Chr(anum)

If this is not what you want, then you need to explain exactly what you are trying to do, and include some of your code.
 
You could try something like this
VB.NET:
Dim Letters As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Dim Letter As String = Letters(index)
 
Good evening,
I have a invoice in crystal report which posts the list of the products and the total sum of the products.

I want to convert this total of the amounts of the product into letter for to post into crystal report.

thank you in advance.
 
What you want to do is spell out numbers using English words. That's what you should have explained in the first place.

There is no such "function" in any language. You need to do the grunt work yourself and come up with a lot of code for each digit and each place value. Start by converting the number to a string and extracting each character one by one. Then write several subprocedures to translate each character to a word, depending on its place value. Then you will need to concatenate the words to a string corresponding to the full number.

Do it little by little, starting with numbers up to 9, and then up to 99. By then, you should have the hang of it. Good luck.
 
Back
Top