>>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