Focal Point
[solved] open an excel file from a focexec

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5157017616

February 15, 2012, 07:08 PM
JohnB
[solved] open an excel file from a focexec
How do you get a focexec to open an existing Excel 2007 file?

This message has been edited. Last edited by: JohnB,


WF 7.7.03, Windows 7, HTML, Excel, PDF
February 15, 2012, 07:23 PM
Waz
Is that to read the contents or to open at your PC


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 15, 2012, 07:27 PM
JohnB
I need to create a link on an html paqe that will open an existing spreadsheet so it displays on the user's monitor and they then can do whatever they need to do with it (sorting, etc.).

So I thought the link would execute a focexec that would have code in it to open the spreadsheet.


WF 7.7.03, Windows 7, HTML, Excel, PDF
February 15, 2012, 07:40 PM
Waz
What does the focexec do ?

If the Excel file exists, just create a link to it.

Does it need to be saved back though, this is where things get tricky.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 15, 2012, 08:00 PM
JohnB
How do you create a link to it in the HTML Composer?


WF 7.7.03, Windows 7, HTML, Excel, PDF
February 15, 2012, 10:25 PM
Waz
I don't use composer, but I think you can create a hyperlink from an object on the page like text.


I tried to use it, and OMG, I think that I'll build by hand.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 16, 2012, 11:05 AM
JohnB
Can you give me an example?


WF 7.7.03, Windows 7, HTML, Excel, PDF
February 16, 2012, 11:38 AM
Tom Flynn
HTML Composer Docs


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
February 16, 2012, 11:59 AM
JohnB
Tom,

I have the documentation, and know how to create a hyperlink in the HTML Composer. I did not see anything on how to open an existing Excel file.

What I need is a specific example of how to do this via a link in the launch page or a call from a focexec that I could create a hyperlink to in the launch page.

Thank you.


WF 7.7.03, Windows 7, HTML, Excel, PDF
February 16, 2012, 02:50 PM
Waz
Just point to the excel file.

e.g.
URL = http://server....../path.../excelfile.xls

The same as if you typed it into a browsers address bar.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 16, 2012, 03:23 PM
JohnB
Tried that, but it didn't work.


WF 7.7.03, Windows 7, HTML, Excel, PDF
February 16, 2012, 03:32 PM
Waz
Where is your excel file ?

Is it under the APP directory structure, or somehwere else ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 16, 2012, 07:20 PM
JohnB
I tried putting it in that application's directory and on my local C: drive. Both times the URL didn't work.


WF 7.7.03, Windows 7, HTML, Excel, PDF
February 16, 2012, 08:10 PM
Waz
Whats the physical location of the file ?

If its sensitive, them PM me.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 16, 2012, 09:04 PM
Dan Satchell
Waz's URL approach works for me when I plug it into the IE browser address bar (so it should also work as a link on an HTML page). Here is a sample of the address I entered:

//WF server name/APPROOT/app folder name/full EXCEL file name



WebFOCUS 7.7.05
February 16, 2012, 09:20 PM
Waz
That should work.

The only thing I can think of at the moment is the file name its self.

Is there any unusual characters in it.

e.g. spaces or ampersands.

Can you try a simple name.

The other thing is if the APPROOT alias is working OK.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 17, 2012, 06:06 PM
JohnB
It was a browser issue.

There is a fix from Microsoft:

http://support.microsoft.com/kb/162059


WF 7.7.03, Windows 7, HTML, Excel, PDF