開發環境:PB9+WIN8*64
源代碼:
string ls_path, ls_file
int li_rc
if dw_data.rowcount() < 1 then
messagebox(‘沒有資料!')
return
end if
ls_path = gnv_app.is_currentPath
ls_file = ls_path + '\TMP.xls'
li_rc = GetFileSaveName ( "保存檔案", ls_file, ls_path, "xls", "Excel ???t(*.xls),*.xls" , "",2^1)
IF li_rc = 1 Then
if dw_data.SaveAs(ls_file, Excel5!, True) = 1 then
messagebox(‘‘OK’’)
else
messagebox(“Error”)
end if
End If
問題如下:
在PB環境下執行,一切正常。
編繹成EXE后,GetFileSaveName() 不執行,就是沒有彈出對話框,請高人指點!
uj5u.com熱心網友回復:
檢查一下ls_path是否為nulluj5u.com熱心網友回復:
程式根目錄放了windows的dll?uj5u.com熱心網友回復:
懷疑ls_path里的值為null,你直接用這個代碼試試ls_path = "c:\"
ls_file = ls_path + '\TMP.xls'
li_rc = GetFileSaveName ( "保存檔案", ls_file, ls_path, "xls", "Excel ???t(*.xls),*.xls" , "",2^1)
uj5u.com熱心網友回復:
我說的是運行環境下,開發環境下可能賦值了,但運行環境下為null轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/26468.html
標籤:基礎類
