Import data from store procedure to excel

SqlBase and Centura Solutions
Cucciolatam

Import data from store procedure to excel

Post by Cucciolatam » 19 Jan 2009, 10:10

I have a problem: I have a program that gives a print of open stocks and I have to enable the user to transfer this data to excel, but I have a store procedure that gives me different data (with different columns).

Moreover during the Fetch Next data can change depending on some checks choosed on the program..

How can I do?
Can you suggest me?
Thanks!

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 463
Joined: 05 Mar 2017, 20:57
Location: Stroud, England <--> Tauranga, New Zealand

Re: Import data from store procedure to excel

Post by Steve Leighton » 19 Jan 2009, 16:02

First use the Stored Proc to read the data into a Table Window - which may or may not be hidden to make everything seem seamless.

If you Sub-Class the Table Window to be an instance of the standard M!Table class , you can then use the Export to Excel function which is really easy to use, fast and reliable.  
I have used this method many many times.Come back if you need more help, or are new to using M!Table.
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 463
Joined: 05 Mar 2017, 20:57
Location: Stroud, England <--> Tauranga, New Zealand

Re: Import data from store procedure to excel

Post by Steve Leighton » 19 Jan 2009, 22:58

.....M!Table Export to Excel is a really great function that (optionally) allows many of a TableWindows attributes to be exported also, eg Font, Cell Color, start up a new instance of Excel , only export certain rows / columns etc etc.

It works with any version of TeamDeveloper and has sooooo many other functions to work with a TableWindow

- such as allowing the user to mark a cell with a circle, nested cells,nested column headers, cell level tooltips, text level tooltips, etc.
- and you can export all this to Excel as well as the data. Magnifique!

Hell -  if you pay my airfare and hotel for a week - I'll come and do the whole job for you, free of charge !

eMail LeightonSteve at Hotmail dot com if you want. 
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 463
Joined: 05 Mar 2017, 20:57
Location: Stroud, England <--> Tauranga, New Zealand

Re: Import data from store procedure to excel

Post by Steve Leighton » 25 Jan 2009, 20:16

Hello ?  Hello ? Earth to Cucciolatam - anyone home?  
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

Cucciolatam

Re: Import data from store procedure to excel

Post by Cucciolatam » 12 Mar 2009, 04:45

AHAHAHAH!! Yeah, I'm on earth!!
Thanks for the suggestion but I solved the problem in another way! However, I'm interested in M!Table Export to Excel.

How can I find it?

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 463
Joined: 05 Mar 2017, 20:57
Location: Stroud, England <--> Tauranga, New Zealand

Re: Import data from store procedure to excel

Post by Steve Leighton » 12 Mar 2009, 23:17

Go To http://www.micsto.de/ Download ,

but make sure you only use the dll appropriate for your TD version eg mtbl41.dll is only for TD v4.1 etc.
All you need to do to make your table an instance of M!Table is call MTblSubClass() .
It must be the first called function on table creation ( SAM_Create ).

Then a whole new universe of TableWindow magic is available to you.

!! Read the manual first to get a feel for everything -
its MTbl/Manual/main.htm after the download !!Y

ou will wish you had used MTblExportToExcel( ) instead of a workaround.  http://www.micsto.de/
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

Cucciolatam

Re: Import data from store procedure to excel

Post by Cucciolatam » 13 Mar 2009, 07:49

Wow! It's great! But we have Centura 2.1 PTF 4.
Can I use all the same this dll?

Cucciolatam

Re: Import data from store procedure to excel

Post by Cucciolatam » 13 Mar 2009, 09:22

Thanks for all! I found it!! It's great!!!

Return to “TekTips”

Who is online

Users browsing this forum: [Ccbot] and 0 guests