DataWindows 导出 Excel功能能否实现,官方以前再吹到现在没有动静了
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- DataWindow导出Excel
- 田 泽
- PowerBuilder
- Thursday, 21 September 2023 16:09 PM UTC
- Thursday, 21 September 2023 16:37 PM UTC
- PowerBuilder
- # 1
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
- Friday, 22 September 2023 08:40 AM UTC
- PowerBuilder
- # 2
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
- Miguel Leeuwe
- Friday, 22 September 2023 08:43 AM UTC
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
-
Helpful Loading... Helpful 3
- Mark Goldsmith
- Friday, 22 September 2023 14:58 PM UTC
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
-
Helpful Loading... Helpful 0
- Sivaprakash BKR
- Tuesday, 26 September 2023 08:17 AM UTC
-
Helpful Loading... Helpful 0
- Tuesday, 26 September 2023 13:44 PM UTC
- PowerBuilder
- # 3
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).
- Tuesday, 26 September 2023 18:08 PM UTC
- PowerBuilder
- # 4
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
- Page :
- 1
However, you are not allowed to reply to this question.
I'll ping Engineering & see.