1. Jean-Christophe Crettenand
  2. PowerBuilder
  3. Thursday, 5 October 2017 07:29 AM UTC

Hello dear members of the Community !

My issue is the following :

I need to be able to save the content of a DW in a .xlsx format. We are using Excel 2013 and Excel 2016. I’m working with a version 12.1 of PowerBuilder and migrating it to PowerBuilder 2017.

The deadline we are facing is the “new” version of Microsoft Office suite.


Do I have to import/install a specific .dll for doing this (I red something about PBDWExcel12Interop115.dll for example) ? Where to find this library, where to install it and how ?

Here is the code that is working today (but with .xls).

What do you suggest to change/adapt ?


long                                    ll_rc

edi_w_planification_pip     lw_parent






// selon variable d'environnement

string                                                     ls_repertoire

ContextKeyword                                lcx_key

string                                                     ls_values[]

n_ds                                                       lds_details_bpc, lds_param_base


lds_details_bpc = CREATE n_ds

lds_details_bpc.DataObject = "d_edi_planif_pip_charge_bpc_det_exp_srv"


lds_details_bpc.Retrieve( il_selected_organisme , lw_parent.of_getanpannee())


ll_rc = THIS.GetContextService("ContextKeyword", lcx_key)

ll_rc = lcx_key.GetContextKeyWords("TEMP", ls_values)

ls_repertoire = ls_values[1]




string                                      ls_filename, ls_datetime, ls_cellule, ls_plage

datetime                               ld_datetime

n_cst_string                           lnv_string


ld_datetime = DateTime(Today(), Now())

ls_datetime = string(ld_datetime)


ls_datetime = lnv_string.of_GlobalReplace(ls_datetime, ".", "-")

ls_datetime = lnv_string.of_GlobalReplace(ls_datetime, ":", "-")


ls_filename = ls_repertoire + &

                                                 "\e-DICS-" + &

                                                 ls_datetime + &




ll_rc = lds_details_bpc.saveas(ls_filename, Excel8!, TRUE)


Who is viewing this page
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 6 October 2017 20:21 PM UTC
  2. PowerBuilder
  3. # 1

I personally love HTMLTable! format.

        dw_1.("sheet.xls", HTMLTable!, True)

Give a filename with xls extension and you'll also get (almost) all DW look&feel (alignment, font size and type, cells, etc...)



  1. Moshe Tangi
  2. Thursday, 12 October 2017 17:14 PM UTC
Marco hi ,

the problem with the html format is the dw fields are saved backwards .

Do you have any idea to fix it ?


  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 5 October 2017 09:05 AM UTC
  2. PowerBuilder
  3. # 2

If you want to use the native export you can save in Excel 2007 format using the SaveAsType XLSX! (excel format for XML data) or XLSB! (excel format for binary data).

For Excel 2007 support you need to deploy the files PBDWExcel12Interop120.dll and Sybase.PowerBuilder.DataWindow.Excel12.dll that you can find in your local installation in directory Sybase\Shared\PowerBuilder. You may also use the Runtime Packager.

Excel 2007 export also requires .NET Framework 3.0 or later.



  1. Jean-Christophe Crettenand
  2. Thursday, 5 October 2017 11:42 AM UTC
Thank you very much René. With you're answer my issue has been solved in 2'.

Best Regards

  1. Helpful
  1. Daniel Vivier
  2. Thursday, 5 October 2017 21:49 PM UTC
In PB 2017, only PBDWExcel12Interop170.dll exists in Appeon\Shared\PowerBuilder (which I assume is the 32-bit version), whereas both that file and  Sybase.PowerBuilder.DataWindow.Excel12.dll exist in Appeon\Shared\PowerBuilder\x64. So what are we supposed to deploy if we are doing 32-bit deployments?

  1. Helpful
  1. René Ullrich
  2. Friday, 6 October 2017 06:19 AM UTC
Yes, it seems to be a bug in the deployment of PB 2017 MR. I have already created a bug ticket.

  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.