DataWindows 导出 Excel功能能否实现，官方以前再吹到现在没有动静了
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.Application.DisplayAlerts = False
lole_Sheet = myoleobject.ActiveSheet
lole_Sheet.Cells.Borders.LineStyle = 0
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]
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).
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,
- 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.
you are right!
It looks like it was on the product road map not too long ago, but now has disappeared?
- Page :
However, you are not allowed to reply to this question.