ltannous
10th December 2002, 18:49
Does anyone have any solutions that they are imputing data from excel to baan. I know that there are a few sample excel speadsheets that came with our installation, but I can't get the uploads to work. I can retreive data from BaaN to Excel, but not able to send data to BaaN.
mark_h
10th December 2002, 19:06
I moved the thread to this forum since this is considered the OLE piece. I do not have any real example where I update data in Baan, but there are two ways that I can think of that you can do this.
(1) Use a OLE function server to put the data to a Baan session and enter data that way. You should be able to search the forum through here for a sample of that method.
(2) Write a Baan dll to write the data into the Baan tables. From Excel pass the data into the DLL. The DLL could then write a record to some Baan table. I will include a brief sample of this code - please note that my DLL actually calls the AFS code.
dllfunction = "sfcdll9475.process.records" & "("
dllfunction = dllfunction & comp$ ' Company
dllfunction = dllfunction & main_f$ ' main from
dllfunction = dllfunction & Main_t$ ' main to
dllfunction = dllfunction & sub_f$ ' sub from
dllfunction = dllfunction & sub_t$ ' sub to
dllfunction = dllfunction & year_f ' year from
dllfunction = dllfunction & year_t ' year to
dllfunction = dllfunction & date_f ' date from
dllfunction = dllfunction & date_t ' date to
dllfunction = dllfunction & efficiency ' Efficiency
dllfunction = dllfunction & salary_perc ' Salary Perc.
dllfunction = dllfunction & simu_comp$ ' Simulation Company
msg = "Start" + String(60, " ")
dllfunction = dllfunction & file1$ ' Input File
dllfunction = dllfunction & file2$ ' Report File
dllfunction = dllfunction & Chr(34) & msg & Chr(34) ' Report File
dllfunction = dllfunction & ")"
BaanObj.ParseExecFunction dllname, dllfunction
I have not actually used this in production yet. This was only a test that I did - and it worked with a little help from Gordon. I have never written directly to a Baan table. Maybe one of these methods will solve your problem.
Good Luck!
Mark