PB資料視窗資料匯出到Excel指令碼需求。 200

2025-02-16 18:30:10 字數 2454 閱讀 5264

pb資料視窗資料匯出到excel指令碼需求。

1樓:網友

long numcols , numrows , c, r

int ret,coli

string colname,colname1

numcols = long(dw_

numrows = dw_

ret = "" )

if ret < 0 then

messagebox("connect to excel failed !"string(ret))

return

end if

truexlsub =

string colnum //判斷是a、b...或aa、ab...還是ba、bb、bc...

if integer(numcols) >26 then

string colnumd,colnumd1

int numcols1,numcols2

numcols1 = mod(numcols,26)

numcols2 = numcols / 26

colnumd = char(numcols1 + 96)

colnumd1 = char(numcols2 + 96)

colnum ="colnumd1 + colnumd +

elsecolnum = char(numcols + 96)

end if

1] =tabname //標題。

1].horizontalalignment = 3

1].verticalalignment = 3

a1:" colnum + 1").merge()

string ls_colname

integer i

for i = 1 to numcols

得到標題頭的名字。

ls_colname = dw_'#' +string(i) +name") t"

i] =dw_ +text")

next/畫**線。

string ls_range

ls_range = a2:" colnum + trim(string(numrows+2))

1= 1= 1= 1/將資料寫到execl

for c = 1 to numcols

for r = 1 to numrows

2,c] =dw_,c]

nextnext

false

2樓:

我不是來問題的。

我是來蹭分的。

你的問題太難,反正分也收不回來,有人答的上你就把分給他吧。

如果沒人答的上。就把分給我吧。

這麼多分浪費了怪可惜的。

pb中如何將資料視窗中的資料匯出成excel表,就是新增匯出控制項中的**該如何編寫!

3樓:網友

把資料視窗的內容都匯出去,包括標題等。

如何使用pb做動態資料視窗,並儲存出excel,儲存出excel我能實現。

4樓:網友

在窗體上新建一資料視窗,不要指定dataobject,再建乙個cb按鈕,clicked事件中寫入如下**:執行即可。

string us_code=""

string lsdwsyntax,lsdwsyntax2string lserr

string lssqlstr

string lserrc

long k=1

lssqlstr="select * from 表名(檢視名)"

select * from 表名(檢視名) 你根據你的情況作修改。

lsdwsyntax = ,"style(type=grid)",lserr)

的報表讀取。

if len(lserr) >0 thenmessagebox("語句錯誤資訊!",lserr)end if

dw_,lserrc)

dw_dw_

在pb中,把資料視窗匯入到excel

5樓:尹萊吻

找黃國酬吧,他是作者。哈哈。

pb在把資料視窗的資料匯出到excel表中的時候,身份證號碼不能精確顯示。解決方法,最好提供**說明。謝謝

6樓:網友

存在問題:(資料視窗名稱為dw位數字從資料視窗匯出excel後,後你的問題太難,反正分也收不回來,有人答的上你就把分給他吧。 如果沒人,ztyqay

7樓:手機使用者

把單元格設定成文字 就好啦。

pb中匯出excel請教!

8樓:網友

一次肯定導不出來,只能分幾個表儲存。

將 sql 資料庫表匯出到Excel (C 實現)

呼叫 export string filetype,string filename 方法,將輸出的檔案型別指定為excel 即。xls 格式即可。如當按clik 如下 protected void button object sender,eventargs e 你可以將資料存到文字檔案中,每乙個數...

如何用同花順匯出歷史價格的資料到excel

方法和詳細的操作步驟如下 1 第一步,在計算機桌面上開啟軟體,見下圖,轉到下面的步驟。2 第二步,完成上述步驟後,單擊 自選股 選項,見下圖,轉到下面的步驟。3 第三步,完成上述步驟後,將看到 加自選 的選項,見下圖,轉到下面的步驟。4 第四步,完成上述步驟後,單擊 加自選 按鈕,見下圖,轉到下面的...

matlab 貼上資料到excel裡出問題了

var matlab variant 通過 變體 呼叫介面是比較低效的,但很方便。begin 變體這種結構,本是vb中的東西。try 如果已有活動的物件,取其介面。matlab getactiveoleobject matlab createoleobject 否則自己建立之。matlab crea...