User login
|
|
Frontpage Sponsor
|
|
Google search
|
|
Poll
|
For ERP LN feature pack upgrade, what method of install are you using? Installation Wizard into existing VRC 38% Installation Wizard into new VRC 38% Manual into existing VRC 5% Manual into new VRC 19% Total votes: 42 |
Baanboard at LinkedIn
|

|
|
|
 |

7th December 2016, 13:16
|
 |
Member
|
|
Join Date: Oct 2013
Posts: 50
|
|
Baan: ERP LN -
DB: sqlserver 2012 -
OS: winxp
|
Hello ,
here is my code to convert .XLS file to .XLSX file
Code:
o.command.line = "/S" & quoted.string("D:\test.XLS")
&" /T" & quoted.string("D:\test_new.XLSX")
& " /F51 /C-4143 /M2"
ret = run.prog( "D:\ConvertXLS.EXE", " " & strip$(o.command.line),
RP_WAIT, "", file.out, file.err)
but execution stops after run.prog command .
This command is perfectly working in command prompt
Last edited by bhushanchanda : 7th December 2016 at 13:20.
Reason: added code tags
|

7th December 2016, 13:22
|
 |
Guru
|
|
Join Date: Sep 2012
Location: India
Posts: 2,345
|
|
Baan: LN FP 1-9, 10.4, a little bit of Baan IV -
DB: SQL Server 2008, Oracle -
OS: Windows Server 2008 R2, Unix
|
Moved to Tools Development Forum.
Have you tried using RP_NOWAIT? Does the executable have execute permissions set to everyone? Also, does the output file folder have full permissions?
Also, I can see there is no space after "/S" and "/T" which I believe should be there.
__________________
Regards,
Bhushan
Unless you try to do something beyond what you have already mastered, you will never grow!
|

8th December 2016, 05:42
|
 |
Member
|
|
Join Date: Oct 2013
Posts: 50
|
|
Baan: ERP LN -
DB: sqlserver 2012 -
OS: winxp
|
hello,
i have tried all combination , with space ,without space and also with RP_NOWAIT.
but it is not working.
this command is run propertly in command prompt , but with using run.prog it's giving -1 as return value.
|

8th December 2016, 08:58
|
 |
Member
|
|
Join Date: Jun 2016
Posts: 52
|
|
Baan: Baan -
DB: DB -
OS: OS
|
Quote:
Originally Posted by frenny
hello,
i have tried all combination , with space ,without space and also with RP_NOWAIT.
but it is not working.
this command is run propertly in command prompt , but with using run.prog it's giving -1 as return value.
|
Error Code <0 indicates program could not be started.
Code -1 could indicate EPERM or Permission Error.
However, is there any entry in the file.out or file.err?
Regards,
|

8th December 2016, 13:48
|
 |
Guru
|
|
Join Date: Sep 2012
Location: India
Posts: 2,345
|
|
Baan: LN FP 1-9, 10.4, a little bit of Baan IV -
DB: SQL Server 2008, Oracle -
OS: Windows Server 2008 R2, Unix
|
Yes. Looks like a permission issue to me as well. You can try adding the executable to a new folder in the D: directory and then try calling it. Also, if that's not working, use
Code:
cmd full_path_of_program_name parameters
and check if that works e.g. this
__________________
Regards,
Bhushan
Unless you try to do something beyond what you have already mastered, you will never grow!
|

8th December 2016, 13:50
|
 |
Member
|
|
Join Date: Oct 2013
Posts: 50
|
|
Baan: ERP LN -
DB: sqlserver 2012 -
OS: winxp
|
Hello,
i have full access to all the drives, even i have tried the same code with server path but it is not working.
this code is working fine with "start.application.local" but we have to implement this functionality in HTML UI and start.application.local is not working in HTML UI.
and also no such error is coming in error file.
|

9th December 2016, 12:19
|
 |
Member
|
|
Join Date: Oct 2013
Posts: 50
|
|
Baan: ERP LN -
DB: sqlserver 2012 -
OS: winxp
|
Hello ,
i have tried same code on server path,but it will goes in infinite loop.
i have also tried with "cmd " but same result .
|

12th December 2016, 19:23
|
 |
Guru
|
|
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,051
|
|
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x -
DB: Oracle,MS-SQL -
OS: HPUX, Linux, Windows
|
Quote:
this code is working fine with "start.application.local" but we have to implement this functionality in HTML UI and start.application.local is not working in HTML UI.
|
Refer to the latest Programmer's guide -
Quote:
start.application.local()
Syntax:
#include <bic_desktop>
function boolean start.application.local (string commandline, boolean waitFlag, ref long exitCode [, const string verb])
Description
This starts the client application specified in the commandline argument.
Arguments
string commandline This specifies the command that starts the application. If commandline does not include a directory path, Windows searches for the executable file in the following directories, in the order shown below:
The Windows system directory.
The Windows directory.
The directories listed in the PATH environment variable.
This argument may also contain the full pathname of a local document. In this case the application associated with this document extension will be started.
The commandline parameter may one or more times include the string ${BSE_TMP} which indicates the ${BSE}\tmp directory in case of Baan Windows or Windows temp directory in case of WebUI.
boolean waitFlag Indicates whether the application must wait for the local application to exit.
ref long exitCode Exit code of local application. Only contains a valid exit code when the waitFlag attribute was true
[const string verb] When the commandline argument contains a document pathname, the optional verb argument may contain the action to be performed on this document. The default action is "open". Another useful verb is: "print". In case this argument is supplied, the waitFlag argument will be ignored and the execution will always by asynchronous.
Return values
true Application started successfully.
false Application failed to start.
Context
This function is implemented in the 4GL Engine and can be used in all script types.
Notes
This function is not supported in HTMLUI. See the Implementing HTML UI support for more information.
|
Implementing HTML UI support
Quote:
Introduction
As HTMLUI does not support functionality that requires a higher privilege level on the client, some client access functions are not allowed anymore. Calls to these functions have to be replaced with other client access functions which are allowed to be used when running in HTMLUI mode. Also, when a session has fields on its form for specifying a client file or client folder, these fields have to be hidden when running in HTMLUI mode.
unsupported client functions in HTMLUI mode
The following functions are not supported when the client runs in HTMLUI mode:
client2server()
server2client()
create.local.file()
create.local.directory()
dir.select.dialog.local()
get.client.directory()
get.client.hostname()
get.local.filename()
remove.local.directory()
remove.local.file()
seq.fstat.local()
seq.open.dialog.local()
seq.open.dialog.next()
seq.saveas.dialog.local()
start.application.local()
When one of these functions is used while running in HTMLUI mode, the following message appear:
This function is not supported in the HTMLUI WebUI: <function>
HTMLUI client functions
The following functions have to be used when the client runs in HTMLUI mode:
Single file functions:
client.upload.file
client.download.file
client.show.file
Multiple file functions:
client.prepare.download
client.add.download.file
client.start.download
client.upload.files
client.get.upload.filecount
client.get.upload.file
client.delete.upload.file.object
Assisting functions:
get.ui.mode()
tc.is.html.ui()
tc.is.thin.client()
client.get.media.type
When one of the HTMLUI client functions is used while NOT running in HTMLUI mode, the following message appear:
This function is not supported in the WebUI: <function>
|
|

22nd December 2016, 12:28
|
 |
Member
|
|
Join Date: Jun 2016
Posts: 52
|
|
Baan: Baan -
DB: DB -
OS: OS
|
Quote:
Originally Posted by frenny
Hello,
i have full access to all the drives, even i have tried the same code with server path but it is not working.
this code is working fine with "start.application.local" but we have to implement this functionality in HTML UI and start.application.local is not working in HTML UI.
and also no such error is coming in error file.
|
From HTMLUI, running an "exe" is going to be next to impossible.
The browser framework (used by HTMLUI) does not allow to run an exe(cutable file).
If your baan server is running on a Windows Server, then you can install this "ConvertXLS.EXE" on the server side... Execute the conversion on the server side and directly download the converted file using "client.download.file"... remember to use "get.ui.mode" and build the logic based on that.
Regards,
|

23rd December 2016, 07:50
|
 |
Member
|
|
Join Date: Oct 2013
Posts: 50
|
|
Baan: ERP LN -
DB: sqlserver 2012 -
OS: winxp
|
Microsoft not supproted
hi all,
Here microsoft words for using runtime creation of new excel exe.
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any non-interactive client application".
so currently i have tried other way to fulfil my requirement.
Thank you all for reply
Frenny
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|