当前位置: 代码迷 >> PB >> 请教把数据窗口内容保存为excel的有关问题
  详细解决方案

请教把数据窗口内容保存为excel的有关问题

热度:80   发布时间:2016-04-29 08:35:05.0
请问把数据窗口内容保存为excel的问题?
RT
例如dw_c.saveas(ls_filename+".xls",Excel8!,True)

 提示错误 Illegal enumerate constant :excel8

------解决方案--------------------
你的pb帮助中,SaveAsType的说明中是否包含excel8!
SaveAsType DataWindow constant

Values 

PowerBuilder enumerated value Web DataWindow Numeric value Meaning
Excel! Excel 0 Microsoft Excel format.
Text! Text 1 (Default) Tab-separated columns with a return at the end of each row.
CSV! CSV 2 Comma-separated values.
SYLK! SYLK 3 Microsoft Multiplan format.
WKS! WKS 4 Lotus 1-2-3 format.
WK1! WK1 5 Lotus 1-2-3 format.
DIF! DIF 6 Data Interchange Format.
dBASE2! dBASE2 7 dBASE-II format.
dBASE3! dBASE3 8 dBASE-III format.
SQLInsert! SQLInsert 9 SQL syntax.
Clipboard! Clipboard 10 Save an image of the graph to the clipboard.
PSReport! PSReport 11 Powersoft Report (PSR) format.
WMF! WMF 12 Windows Metafile format.
HTMLTable! HTMLTable 13 HTML TABLE, TR, and TD elements.
Excel5! Excel5 14 Microsoft Excel Version 5 format.
XML! XML 15 Extensible Markup Language (XML).
XSLFO! XSLFO 16 XSL (Extensible Stylesheet Language) Formatting Objects (XSL-FO).
PDF! PDF 17 Portable Document Format (PDF).
Excel8! Excel8 18 Microsoft Excel Version 8 and higher format.
  相关解决方案