Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert excel to DBF file
Message
 
 
To
24/07/2017 12:01:46
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01652806
Message ID:
01652817
Views:
68
>>>>>>Hi,
>>>>>>I usually convert an excel spreadsheet to a DBF file by first saving it into a CSV format and then importing into a DBF.
>>>>>>
>>>>>>But this spreadsheet (attached) does not have a clear structure of columns. The attached spreadsheet shows the pattern; the actual one has many more “records”
>>>>>>
>>>>>>How would you devise a plan to convert such a spreadsheet to a DBF?
>>>>>
>>>>>I'll use Automation to read this file.
>>>>
>>>>Could you, please, clarify what you mean by Automation? Sorry that I have not looked at and did any of the automation in a long time.
>>>
>>>Something like:
>>>
>>>oExcel = CREATEOBJECT("Excel.Application")
>>>oExcel.WorkBooks.Open(full_path_to_file_here)
>>>** read sheet information.
>>>oExcel.Close()
>>>oExcel.Quit()
>>>oExcel = null
>>>
>>
>>Thank you. In either case, using the automation or the Greg Green's tool, I will need to figure out the "pattern". Like, for example, that the cell Est Hrs always falls on column E rows 5, 15, 25, and so on. And then "scan" through the spreadsheet to extract the values.
>
>To use Greg's library, you'll have to transform the .xls as a .xlsx, first.
>
>Instead of exporting to CSV, can you export to Excel's XML 2003 format?

I have converted the sample .xls to the XML 2003 format. How would I import it into a DBF/cursor?
"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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform