How to use olexlsf.dll ?

A forum for discussions related to 3rd party tools used with Team Developer.

How to use olexlsf.dll ?

Postby lairton » Tue Jul 13, 2010 12:27 pm

Someone is using the library olexlsf.dll?
After recommendation by Jeff here on the forum, I have tried to use but can not! The ActiveX Explorer causes an error.

The error message is: "One or more functions cannot be generated. PLease check event log for more details."
In Windows event log, I have the following messages ...

Could anyone help me?
I've already tried inwindows XP, Vista, Seven

NewApp.app - Function PropGetItem cannot be generated because the parameter type is not supported. OLE Automation Error.
NewApp.app - Function FindRectContainingCellCoord cannot be generated because the parameter type is not supported. OLE Automation Error.
NewApp.app - Function GetUsedRect cannot be generated because the parameter type is not supported. OLE Automation Error.
NewApp.app - Function FindMergedRectContainingCellCoord cannot be generated because the parameter type is not supported. OLE Automation Error.
NewApp.app - Function FindMergedRectContainingCell cannot be generated because the parameter type is not supported. OLE Automation Error.
NewApp.app - Function SaveRectAsHTML cannot be generated because the parameter type is not supported. OLE Automation Error.
NewApp.app - Function SaveRectAsTXT cannot be generated because the parameter type is not supported. OLE Automation Error.
NewApp.app - Function PropGetFreezePoint cannot be generated because the parameter type is not supported. OLE Automation Error.
Lairton N de Almeida Jr.
lairton
 
Posts: 269
Joined: Mon Jan 28, 2008 8:14 am
Location: Brazil

Re: How to use olexlsf.dll ?

Postby Jeff Luther » Tue Jul 13, 2010 3:47 pm

First thing to say: This was not an easy APL/AX to get working at all, so if you still have trouble be sure to visit the SM Software site, see their Help. And if all else fails, and you can use it, Michael's M!Table also supports Export in XLS format for a table window.

What version of TD? I assume you did this OK: REGSVR32.EXE c:\windows\system32\olexlsf.dll

PropGetItem for various classes worked OK, so I'm not sure why all your errors.

I recall there were a couple methods from the original AX SM Software they released, like GetUsedRect, that used a C struct as a param. Since TD doesn't support that I had to request from them a variation of that method that has a param. for each Number property in the rectangle. And in fact that list you have below are the methods I had to comment out because I got an error due to a non-support param. type (likely C struct) myself. I just didn't use those methods.

I see I used Type Lib: SM Software OLEXLSFile v4.0... AND MAKE SURE: you select Group Members + ALL "Show xxx" options (icon background is yellow/orange when selected) and click "Check All Shown" in the AX Explorer dlg. box. before you try to create the APL. Then "Generate Full". It's the "I" (Interfaces) objects shown in the image that I think you are missing. Those "I" objects are the 2nd param. types for the PropGetItem methods declared in the various classes.
OLEXLSFile AX options.png
You do not have the required permissions to view the files attached to this post.
Jeff Luther
 

Re: How to use olexlsf.dll ?

Postby lairton » Wed Jul 14, 2010 7:19 am

Jeff

We are preparing a new big version of our product. until today the product is built using CTD151. We preparing a new big version in TD5.2.
We are looking for an idea to offers to our customers a feature to allow export our reports to XLS file. ( Excel, openOffice etc ). This is THE FEATURE that our users want most! :) the big ONE.

We already using MTable, but our reports do not pass data to table windows. We do not use this method to create our reports. We use "tradictional" way, SAM_Report* messages.

I'm using "SM Software OLE XLSFile v4.0" as you described in your ActiveX Explorer instructions.
But the errors remains.

Thank you for your help.



Lairton.
Lairton N de Almeida Jr.
lairton
 
Posts: 269
Joined: Mon Jan 28, 2008 8:14 am
Location: Brazil

Re: How to use olexlsf.dll ?

Postby Jeff Luther » Wed Jul 14, 2010 5:53 pm

our reports do not pass data to table windows

I understand: M!Table will export but only from a TW. It may be that for a user who wants an XLS file you could add code to special-case something like:
* create a hidden TW used specifically for XLS export with no columns defined it it
* make sure TW attributes are Discardable = No and Max Rows = 1000000 or something very large
* populate the TW with the same SQL query that is currently being used using SalTblPopulate() - this creates the columns
* export the data in the TW to the XLS file
* destroy the TW
* return control to the current form

Something to think about, perhaps:
* with dynamically created columns -- created with SalTblPopulate() -- all the columns are of type String. If this is OK with you, you are in business.
* If, on the other hand, you query the DB meta data/data dictionary info. for the SQL query to get correct DB column types for each column in the query (this is what Q does), then you can call SalTblCreateColumnEx() for each column and specify the data type. If formatting, column type in the XLS file, etc. is important you may have to do this.

Frankly, from my experience, my suggestion about having a hidden tblExportToXLS coded to get the data and using M!Table will likely be easier than getting the SM Software to work.
Jeff Luther
 

Re: How to use olexlsf.dll ?

Postby lairton » Thu Jul 15, 2010 1:23 pm

Thank you Jeff,
I'll create a prototype using your suggestions.
Lairton N de Almeida Jr.
lairton
 
Posts: 269
Joined: Mon Jan 28, 2008 8:14 am
Location: Brazil

Re: How to use olexlsf.dll ?

Postby Jeff Luther » Thu Jul 15, 2010 2:27 pm

Ok. I forgot to write yesterday: When you call SalTblPopulate() on this temp. table window used to get report data which is then exported to XLS file, be sure to populate via TBL_FillAll method. For a large result set, this can be a performance hit, but your code wants to be sure all rows are fetched before you try to export.

Using TBL_FillAll SalTblPopulate() won't return until all rows are fetched, after it returns then your M!Table code can take over to export to an XLS file.
Jeff Luther
 

Re: How to use olexlsf.dll ?

Postby Samy » Tue Nov 24, 2015 10:52 am

Hello,

since TD 6.x uses this DLL for exporting grids to Excel, I thought it would be a good idea to use this dll also vor exporting child table Windows - even for older Versions (as Jeff Luther has done years before as I read here).
Unfortunately, I do not get the ActiveX Explorer create the classes correctly. Does anyone have a running sample of how to use this dll for exporting or even manipulating existing Excel files?
LG Samy
Samy
 
Posts: 26
Joined: Thu Feb 14, 2008 6:25 am

Re: How to use olexlsf.dll ?

Postby Rainer » Mon Jan 16, 2017 10:59 am

Hello

I would be interested in a woking AX library for the olexlsf.dll, too. For TD 4.2.
I tried the ActiveX Wizard of TD 4.2, but did not get it working.

Regards,
Rainer
Rainer
 
Posts: 516
Joined: Tue Dec 16, 2008 7:33 pm

Re: How to use olexlsf.dll ?

Postby Jeff @ PC Design » Mon Jan 16, 2017 6:10 pm

I see the same thing, Rainer. Originally, we'd written Q in v5.2 so I generated the APL with v5.2 and back-converted to v4.2. One function wouldn't compile because the parameter's type wasn't found (?) I commented out that SetList function with a 'JL' comment note.

Note that I kept "-TDv41&42" as part of the APL name as I was working with a couple versions of the APL. Feel free to remove that for your v4.2 appl. I generated the APL with all options and used 'Full'. OH -- note that I had to provide a full path for my 4.2 automation.apl just to verify that the OLE APL would compile. Remove that declaration and uncomment the other one. Likely v4.2 is in your PATH.

** in the Help folder, be sure to read "! CHM files.txt" -- it tells you how to unblock the CHM file so the text for the various help options displays.
You do not have the required permissions to view the files attached to this post.
Jeff Luther/PC Design http://www.jeffluther.net/TD/
Image
Come join us at Dave Rabelink's "Team Dev. Community Forum".
All TD, TDMobile & SQLBase users welcome!
(http://tdforum.daverabelink.net/index.php)
Jeff @ PC Design
 
Posts: 206
Joined: Fri Feb 08, 2013 2:40 pm
Location: Palm Springs, California

Re: How to use olexlsf.dll ?

Postby Rainer » Tue Jan 17, 2017 9:35 am

Hi all,

I've got a working but not complete version of the ActiveX apl generated with TD 4.2. I've attached it.

But we have decided to use libXL instead, which has to be included as external dll and is still enhanced/supported by it's company. I've attached an incomplete sample, too.
For more details have a look at: http://www.libxl.com/home.html

Regards,
Rainer
You do not have the required permissions to view the files attached to this post.
Rainer
 
Posts: 516
Joined: Tue Dec 16, 2008 7:33 pm

Re: How to use olexlsf.dll ?

Postby Rainer » Tue Jan 17, 2017 9:42 am

One function wouldn't compile because the parameter's type wasn't found (?) I commented out that SetList function with a 'JL' comment note.

In the lib I've created with TD4.2 and which I've attached, there are more functions commented (with a ### note).
All this functions are not present in your apl.
So I think, both apls are the same;-)

Regards,
Rainer
Rainer
 
Posts: 516
Joined: Tue Dec 16, 2008 7:33 pm

Re: How to use olexlsf.dll ?

Postby Jeff @ PC Design » Tue Jan 17, 2017 10:16 am

I can run both demos as you've attached them, Rainer. And I agree that if a license is necessary -- even if you have to include a DLL as part of your application so you can distribute the runtime version -- LibXL is better.
Jeff Luther/PC Design http://www.jeffluther.net/TD/
Image
Come join us at Dave Rabelink's "Team Dev. Community Forum".
All TD, TDMobile & SQLBase users welcome!
(http://tdforum.daverabelink.net/index.php)
Jeff @ PC Design
 
Posts: 206
Joined: Fri Feb 08, 2013 2:40 pm
Location: Palm Springs, California


Return to Tools

Who is online

Users browsing this forum: No registered users and 1 guest