1. 田 泽
  2. PowerBuilder
  3. Thursday, 21 September 2023 16:09 PM UTC

DataWindows 导出 Excel功能能否实现,官方以前再吹到现在没有动静了

Brage Mogstad Accepted Answer Pending Moderation
  1. Tuesday, 26 September 2023 18:08 PM UTC
  2. PowerBuilder
  3. # 1

The native Excel functions are still not very smooth if you want wysiwyg.
We allow the user to select WYSIWYG in a setup that basically is OLE. Goes pretty much like this:
dwo.SaveAs( ls_docname, HTMLTable!, TRUE ) 
oleobject myoleobject, lole_Sheet
myoleobject = CREATE OLEObject
myoleobject.ConnectToNewObject("Excel.Application")
myoleobject.Application.DisplayAlerts = False
myoleobject.Workbooks.Open(ls_docname)
lole_Sheet = myoleobject.ActiveSheet
lole_Sheet.Cells.Borders.LineStyle = 0
myoleobject.Activeworkbook.SaveAS(ls_xls, 1)
myoleobject.Workbooks.close()
myoleobject.quit()
myoleobject.DisconnectObject()

The other option is to scan the dwo for columns & computed fields, what bands they reside in.

ls_syntax = sqlca.SyntaxFromSQL(as_sql,'style(type=grid)',ls_errors)
ll_ret = lds.create(ls_syntax,ls_errors)
ll_ret = lds.SetTransObject(sqlca)
ll_ret = lds.Retrieve()

Then map it together using data syntax.
lds.Object.Data.Primary.Current[1,ll_colid_new,ll_count,ll_colid_new] = adw_dwo.Object.Data.Primary.Current[1,ll_colid,ll_count,ll_colid]

Regards
Brage

Comment
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Tuesday, 26 September 2023 13:44 PM UTC
  2. PowerBuilder
  3. # 2

If some planned feature(s) are removed, it will be better to be added in the Roadmap page, in a separate section.  It will be helpful for those waiting for the new feature.   It's easy to miss these important updates, if mentioned in this forum thread(s).  

 

Comment
There are no comments made yet.
Julie Jiang @Appeon Accepted Answer Pending Moderation
  1. Friday, 22 September 2023 08:40 AM UTC
  2. PowerBuilder
  3. # 3

Hi all,

Sorry our team decided to remove this feature from the current roadmap after more deep research into it. The main reasons are:

1) The formats and display in DWs are very complex to be faithfully exported into Excel. We tested the third party tool, and found that the tool has difficulty preserving Picture, Button, number format, and display values of radio buttons and checkbox. It may be acceptable for the third-party tool. But we do not want to produce a feature that cannot meet the required standard.

2) The exporting feature will have dependency on the Excel APIs.  It will be a major maintenance hassle because we would need to synchronize with any change that may happen to the Excel APIs.

It is not a permanent decision.  But for the present the team would rather focus their efforts on more important things.  If later it turns out that this feature is really greatly desired, we will check on it again.

Best regards, Julie 

Comment
  1. Miguel Leeuwe
  2. Friday, 22 September 2023 08:43 AM UTC
Hi Julie,

It would be nice if this kind of decisions could be communicated. There might have been people deciding NOT to buy dw2xls because this was a promised feature. Now, without them even knowing, they are waiting for something that never might come.

Thanks for the update,

best regards
  1. Helpful 3
  1. Mark Goldsmith
  2. Friday, 22 September 2023 14:58 PM UTC
Hi Julie,

The formatting issue aside, it would be nice to have the flexibility to choose whether the columns that were in the original Select statement or the columns that end up being displayed in the datawindow are included in the output. Right now it's one or the other depending upon the various SaveAs formats one chooses:

Excel/ Excel5/ Excel8/ XLSX - Based upon original select statement columns

Text - Based upon original select statement columns

CSV - Based upon original select statement columns

PSReport - Based upon the datawindow

HTMLTable - Based upon the datawindow

PDF - Based upon the datawindow

XML - Based upon the XML Export/ Import Template

Yes, there are workarounds and I tend to use OLE very often anyway so that's my approach for a workaround. I can also appreciate that PowerBuilder is probably using different tools behind the scenes for each of the SaveAs formats and that's why there is this inconsistency.

That being said, while the formatting challenge may push out the timeline for the desired changes to the SaveAs functionality, it would be nice to at least incorporate the ability to choose which "set" of columns - Select statement or datawindow - to include in the output.

Just my .02.

Regards,



Mark
  1. Helpful
  1. Sivaprakash BKR
  2. Tuesday, 26 September 2023 08:17 AM UTC
I didn't expect this reversal decision of Appeon, though not final.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 21 September 2023 16:37 PM UTC
  2. PowerBuilder
  3. # 4

Hi,

you are right!

It looks like it was on the product road map not too long ago, but now has disappeared?

https://community.appeon.com/index.php/qna/q-a/power-builder-upgrade-dw2xls-library

Regards

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 21 September 2023 20:11 PM UTC
Yes, looks like Product / Engineering has taken that off the list of new features or this area of the website still needs updating.

I'll ping Engineering & see.
  1. Helpful 1
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.