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.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
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).
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
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