monica1
28th June 2005, 11:07
There is any way to transfer baan data to a excel document but inserting the data in particular cell using a predefined sheet?

Thank you in advance,

beginer
28th June 2005, 11:55
Hi ,

We had done it writing a macro in Excel.
Basically we wrote a VB Script which established connection , used BaaN dll to fetch data & populate the Excel Cells.

But I suppose u would be interested in something that could be handelled thru BaaN ?

monica1
28th June 2005, 12:11
Hello beginer and thank you for your reply.
Can you send me an example? How to connect excel with Baan? I don't know how to do that.

beginer
28th June 2005, 13:09
Go thru the following....Hope u understand :)

I m writing down what I remember instantly :)

This is how u create a connection...

Set BaanObj = CreateObject("Baan.Application")

A BaaN Dll which can be used for fetching the data :-

BaanObj.ParseExecFunction "ottdllsql_query", B_function

the variable B_function contains something as follows :-

B_function = "olesql_parse(""select tcmcs045.creg, tcmcs045.dsca from tcmcs045 "")"


' The function olesql_getstring retrieves the query result and stores it in the second argument,

B_function2 = "olesql_getstring(""tcmcs045.creg"","" "")"
B_function3 = "olesql_getstring(""tcmcs045.dsca"","" "")"

BaanObj.ParseExecFunction "ottdllsql_query", B_function2
temp_string = BaanObj.ReturnCall
creg = Mid(temp_string, 35, 3)


BaanObj.ParseExecFunction "ottdllsql_query", B_function3
temp_string = BaanObj.ReturnCall
dsca = Mid(temp_string, 35, 3)



While (creg <> "")
' fill spreadsheet
Worksheets("Areas").Cells(Row, Column) = creg
Worksheets("Areas").Cells(Row, Column + 1) = dsca
Row = Row + 1

dorleta
4th July 2005, 13:25
if you have the ancient versions of baan client you will have 3 or 4 examples

this is one of theirs

monica1
4th July 2005, 13:37
Thank you very much Dorleta.
With this examples I can see the method.

monica1
18th May 2006, 11:19
Dorleta, can you send me the file Baan.xla that you have in C:\MSOffice\Excel ?
I have retaken the subject and I don“t find this file to test the examples you put in.

Thank you in advance,

dorleta
18th May 2006, 23:24
Yes, these are the examples that I have and I hold

Estos son los ejemplos que tengo y creo recordar que colgue

dorleta
22nd May 2006, 18:30
rename as baan.xla