Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert number to a char string
Message
 
 
À
09/12/2019 10:51:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01672170
Message ID:
01672197
Vues:
51
>>Hi Antonio,
>>
>>Here is the explanation. Some customers have cost centers as numbers (e.g. 800.0045) but my program has a table where these cost centers are characters (e.g. "800.0045") (because different customers have a different pattern of values).
>>I was converting from an excel spreadsheet that customer sent me to my table. I was trying to create a generic code that would work with any set of values.
>>And thank you for the sample code.
>
>Ok, Dmitry, it's becoming clearer to me. If I got it completely right, you must respect whatever string of characters the Excel file has in the cell / column that holds the cost center id and insert it as a character in your table.
>
>Can you export the Excel data to CSV and just then append the rows to your tables, in that way enforcing the target type as character instead of number?

Yes, I suppose I can export the excel to CSV. But I found that using the library created by Greg Greene makes it easier. Since I can do it all in once step, code that directly converts the excel to a DBF table.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform