1. Pratim Singha
  2. PowerBuilder
  3. Monday, 3 September 2018 15:12 PM UTC

We have datawindow designed to display a report.

Objective: We want to export the data in the datawindow to an Excel Sheet.

Code to achieve the above objective is:

dw_1.SaveAsFormattedText(LocationToBeSavedAt)

Problem: Data gets displayed in the excel sheet but the alignment gets incorrect.

Powerbuilder version: Powerbuilder 2017 R3 Build 1858.

This design worked fine with PowerBuilder 12.5 Classic.

 

For Example, the datawindow is designed as following table:

Header1 Header2 Header3
SubHeader1_1|SubHeader1_2 SubHeader2_1|SubHeader2_2 SubHeader3_1|SubHeader3_2

 

But when the values get stored in the excel sheet, it displays as follows:

Header1 Header2 Header3

 

 

 

 

SubHeader1_1 SubHeader1_2 SubHeader2_1 SubHeader2_2 SubHeader3_1 SubHeader3_2

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 September 2018 17:54 PM UTC
  2. PowerBuilder
  3. # 1

Hi Pratim;

  If you open a support ticket, you can attach almost any file format to that ticket (ie: DWO source).

Make sure that the support team can see the behaviour using PB 12.5 vs 2017Rx.

Regards ... Chris

Comment
There are no comments made yet.
Pratim Singha Accepted Answer Pending Moderation
  1. Wednesday, 5 September 2018 16:11 PM UTC
  2. PowerBuilder
  3. # 2

Hi Chris,

The screenshot of DWO in runtime mode is attached as PNG file.

I tried to attach the excel sheet but the site throws error saying that xls file is in an unsupported format. But I am able to open the file in my machine. So have attached the snapshot of the Excel sheet here.

 

One more query here:

Is there any way to export data from dwo to xlsx file from PowerBuilder vis SaveAsFormattedText.

If not, is there any other way to export data into xlsx file.

Attachments (2)
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 4 September 2018 13:40 PM UTC
  2. PowerBuilder
  3. # 3

Hi Pratim;

  This problem could have been introduced in PB 12.5.1 / 12.5.2 or even version 12.6 as well. Appeon PB is based upon the 12.6 classic code line. My suggestion would be to add some test data to the DWO you use for exportation (in the DW Painter) that is representative of what you would see in Excel.  I would then open a support ticket and then attach the exported DWO source to that ticket - along with a screen capture of how it looks in Excel from PB12.5. That should allow the Appeon Support team to check the DWO's behaviour accordingly.

HTH

Regards ... Chris

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.