1. Lucia Radita
  2. PowerBuilder
  3. Wednesday, 5 May 2021 14:56 PM UTC

Hello Appeon team

context: PowerBuilder 2019R3 Professional, build #2670

OS: Windows 10; Windows Server 2016

In the application, we have a module allowing to associate to (ex.) products different files, images, html, documents

We decided to use the new PB WebBrowser  control, being faster than MS Web browser ole

Appeon documentation indicates that WebBrowser supports browsing local files "(including htm, gif, jpg, jpeg, png, swf, txt, c, cpp, pdf, etc.) ".

There is no problem to browse a txt or pdf document but browsing Excel an/or Word does not work.

The Navigate function returns 1 (success) there is no error raised and progressIndex from NavigationProgressIndex event is 100. Nevertheless these types of file are not shown in the control.

The question is: does the PB WebBrowser  control support to browse xlsx, docx files?

 

thank you,

 

Lucia Radita

Lucia Radita Accepted Answer Pending Moderation
  1. Friday, 7 May 2021 13:08 PM UTC
  2. PowerBuilder
  3. # 1

Thank you all for your response and suggestions.

 

Lucia

Comment
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Friday, 7 May 2021 09:08 AM UTC
  2. PowerBuilder
  3. # 2

Hi Lucia,

 

WebBrowser Control doesn’t support opening docx, xlsx files.

WebBrowser is developed based on Chromium and thus similar to Google Chrome. If you cannot open a certain type of file in Google Chrome, such as docx and xlsx, then it cannot be opened in WebBrowser either.

 

Regards,

Ken

 

Comment
There are no comments made yet.
Tobias Roth Accepted Answer Pending Moderation
  1. Thursday, 6 May 2021 15:37 PM UTC
  2. PowerBuilder
  3. # 3
 

Hi Lucia,

you can try to use a javascript viewer in the Webbrowser control. see attachment.

Maybe there are offline viewer solution to run it on the local machine.

Regards Tobi

Attachments (1)
Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 6 May 2021 15:06 PM UTC
  2. PowerBuilder
  3. # 4
Depending on your settings of office, your xlsx or docx will simply be zipped html/xml.
Try to unzip to a temporary file and then load the html. Not saying it works, but it's worth the try.
regards.
 
EDITED:
Not easy as I would thought it would be, no html, only xml and folders:
 
See the attached image. (don't know why suddenly we cannot simply paste an image anymore).
Attachments (1)
Comment
There are no comments made yet.
Daryl Foster Accepted Answer Pending Moderation
  1. Thursday, 6 May 2021 00:40 AM UTC
  2. PowerBuilder
  3. # 5

Hi Lucia, it is very unlikely that the WebBrowser control will display xlsx or docx files.  WebBrowsers generally only display web file formats (plus pdf).  If you try to open an xlsx or docx file in Chrome or Edge, it will download it, but it won't display it inline. You would need a separate viewer control (or embed Word and Excel) if you want to display these to your end user.

Comment
  1. Miguel Leeuwe
  2. Thursday, 6 May 2021 15:05 PM UTC
Depending on your settings of office, your xlsx or docx will simply be zipped html/xml.

Try to unzip to a temporary file and then load the html. Not saying it works, but it's worth the try.

regards.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.