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