Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import data from store procedure to excel 1

Status
Not open for further replies.

Cucciolatam

Programmer
Jan 19, 2009
7
IT
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!
 
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.
 
.....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.

 
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?
 
Go To
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 !!

You will wish you had used MTblExportToExcel( ) instead of a workaround.



 
Wow! It's great! But we have Centura 2.1 PTF 4.
Can I use all the same this dll?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top