cancel
Showing results for 
Search instead for 
Did you mean: 

error when trying to save to an xlsx file

Former Member
0 Kudos

I have an application (pb12.6 classic)

When I execute the command

if (dw_humboldt_out.SaveAs(s_path,XLSX!,TRUE,EncodingANSI!) < 0) then

it works fine on my machine... but, of course I have pb12.6 development installed

I have a person, who simply has the application installed, and it fails to create the file

Any ideas?

we are both running windows 7.... excel 2010

Accepted Solutions (1)

Accepted Solutions (1)

CobyKako
Advisor
Advisor
0 Kudos

Hello Scot,

Verify that library Sybase.PowerBuilder.DataWindow.Excel12.dll has been deployed to the GAC of target computers: PowerBuilder runtime files

To be safe, use the PowerBuilder Runtime Packager (pbpack126.exe) to install necessary PB DLLs

HTH,

Jacob

Former Member
0 Kudos

copied both sybase.powerbuilder.datawindow.excel12.dll

and pbdwExcel12Intgerop125.dll

and still was unable to create the file

Former Member
0 Kudos

oh... sorry... forgot... i'm using 12.5.2

not 12.6 for this app

CobyKako
Advisor
Advisor
0 Kudos

Just copying is not enough.. you need to ensure that assembly sybase.powerbuilder.datawindow.excel12.dll is installed in the 32bit GAC:

Please use the Runtime Packager to be safe::

SyBooks Online

Former Member
0 Kudos

Hi Scot;

  FWIW: open up your PB 12.5.2 Help and do a search on "deployment". That should bring you to a section on the files needed per PB feature.

HTH

Regards ... Chris

Former Member
0 Kudos

well... we've always deployed the necessary files for the app, and never had any problems

but, this xlsx is a new thing

she's saying that they basically have to be registered

below is the list of dll's that we deployed with 12.5.2

and everything was working ok.... but, we added this excel saveas... and started to have issues

Former Member
0 Kudos

The "Deployment" section states that these files need to be deployed for EXCEL support ...


  PBDWExcel12Interop125.dll,

   Sybase.PowerBuilder.DataWindow.Excel12.dll


Since one of the above are a .Net assembly - you need to either:


a) Place it in the same folder as your Application EXE

  - or -

b) From a different location - register these assemblies to the GAC using the Microsoft gacutil.exe utility:    Gacutil.exe (Global Assembly Cache Tool)



HTH

Former Member
0 Kudos

I did place those 2 files in the same location as the exe

still didn't work

Jacob is telling me that it needs to be part of the GAC... and, to use the pbpack util

Former Member
0 Kudos

  Yes, the PB "Packager" is another "means to an end" as it will deploy the .Net assemblies and run the GACUtil.exe for you - as opposed to my alternative ... running the GAC registration utility manually. The end result will be the same.  

Former Member
0 Kudos

it's working now

thanks for the help

Former Member
0 Kudos

Great news Scot!  

Have you ... "hugged your DataWindow today"?    

CobyKako
Advisor
Advisor
0 Kudos

Scot,

Glad to read issue has been sorted out using the PB runtime packager, solution I advised twice in my posts

P.S: I never said to use the GAC tool AND the runtime packager, only that the packager is the best and safer solution to avoid having deployment concerns (such as GAC registration).

Former Member
0 Kudos

We are going to use option a) above until we have time to install last patches in development and deploy "appropriately" with PB runtime packager.

Chris, thanks again for all your powerbuilder's tips!

Former Member
0 Kudos

Excellent news Scot!   

Former Member
0 Kudos

Hi Nacho ... you are most welcome!  

Answers (0)