PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - RobL

Pages: [1]
1
Nomads / Displaying an Excel spreadsheet on a NOMADS panel
« on: June 04, 2021, 07:55:23 PM »
Hi All,

I'm trying to display an Excel spreadsheet within a COM control defined on a NOMADS panel. I have the COM Control defined as "Excel.Application". In the "PostCreate" logic contains the following code:

filename$=pth("2013-09-30.xlsx")
com_1.ctl'Workbooks'Open(filename$)
com_1.ctl'Visible=1


When I test the panel, Excel starts in a window behind the NOMADS panel and loads the specified file. I've also tried something similar outside of NOMADS, with the same result; Excel opens in a separate window.

begin
def object xl,@(2,2,60,40)="Excel.Application"
xl'Workbooks'Open(pth("2013-09-30.xlsx"))
xl'Visible=1
xl'Quit()


I found some code in my Mailing List archive that works using "Shell.Explorer" and PDF files, and optimistically hoped it would work in a similar fashion with Excel.

Is it possible to do this? Any nudges in the right direction would be greatly appreciated!!

Regards,

Rob Leighton
Riverwood Enterprises Inc.

2
Hi,

A message box containing the message "Unable to connect to the update server to obtain patch list" is displayed when I try to apply the September 2019 update to PxPlus 2019.

Can someone point me in the right direction to correct this issue?

Thanks in advance!

Rob Leighton
Riverwood Enterprises Inc.

3
Language / XEQ() question
« on: September 07, 2018, 02:06:12 PM »
Hello all!

I'm experimenting with using a combination of a local function, XEQ() and a CALL routine, as a substitute for using a global function. I've got it working and I'm happy with the results, except for one issue. I can't figure out how to LOCALize the variable that returns the value from the CALL routine.

Here's an example:

! test
begin
extension$=".exe"
print "extension$ - before: ",extension$
file_ext$=fnget_extension$("myfile.jpg")
print "file_ext$: ",file_ext$
print "extension$ - after: ",extension$
end
!
def fnget_extension$(local filename$)=xeq("functions;get_extension",extension$,filename$,extension$) ! get the file extension from the specified filename

! functions
GET_EXTENSION:! get file extension from the specified filename
enter (filename$),extension$
extension$=""
p=pos("."=filename$,-1)
if p then extension$=filename$(p+1)
exit

Here's the output :
->run
extension$ - before: .exe
file_ext$: jpg
extension$ - after: jpg
->

I tried adding LOCAL to parameters in the XEQ() statement, but that results in an error 20.

Is there any way to prevent extension$ from being modified?

Regards,

Rob Leighton
Riverwood Enterprises Inc.

Pages: [1]