FW_ExcelToDBF to be extended (enhanced)

Post Reply
User avatar
Marc Venken
Posts: 727
Joined: Tue Jun 14, 2016 7:51 am

FW_ExcelToDBF to be extended (enhanced)

Post by Marc Venken »

I use this function regular in some apps.

It would be great if it can be possible that we add a 2 dim. array that would/could change the headers in the excel file in order to match these of the dbf.

The dbf fields are defined, but the exels that I get are always differend than the dbf.
The sollution maybe :

aStruct := {}
DBF EXEL COLUMN
AADD(aStruct, { "Code" , "art_nummer"}) // link to Code
AADD(aStruct, { "Code" , "art_code"}) // Also link to code : there can be many more options to link to the dbf field (code)
AADD(aStruct, { "Datum" , "Datums"})
AADD(aStruct, { "Aantal" , "Quantity"})
AADD(aStruct, { "Aantal" , "menge"})
.....

The idea is that I fill the 2 dim array with Xbrowse data and past it to the FW_execltodbf

So, it will need to check if a value (2de argument = exelheader) exsist in the array in order to see if it is there. If so it needs to take the 1st argument and use that as the new header.
So several exel files could have a header colums that would link to 1 dbf field (code) in this example.

Exel headers that a not found may be omidded or just keep the exel header. The conversion will only keep the corresponding field names.

Exel = "Art_nummer, datums,menge" and would convert like
DBF = "Code,datum,aantal"

Can this be done ???
Marc Venken
Using: FWH 20.08 with Harbour
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FW_ExcelToDBF to be extended (enhanced)

Post by nageswaragunupudi »

Good suggestion.
We will provide this in our next version.
Regards

G. N. Rao.
Hyderabad, India
Post Reply