閱讀版:
以下內容為程序代碼:
1 dates:=date;
2 opens:=open;
3 highs:=high;
4 lows:=low;
5 closes:=close;
6
7 <%
8 dates=ffl.vardata("dates")
9 opens=ffl.vardata("opens")
10 highs=ffl.vardata("highs")
11 lows=ffl.vardata("lows")
12 closes=ffl.vardata("closes")
13
14 set oexcel=createobject("excel.application")
15 oexcel.visible=true
16 oexcel.workbooks.add
17
18 for i=1 to ubound(dates)
19 oexcel.cells(i,1).value=dates(i)
20 oexcel.cells(i,2).value=opens(i)
21 oexcel.cells(i,3).value=highs(i)
22 oexcel.cells(i,4).value=lows(i)
23 oexcel.cells(i,5).value=closes(i)
24 next
25 %>
拷貝版:
dates:=date;
opens:=open;
highs:=high;
lows:=low;
closes:=close;
<%
dates=ffl.vardata("dates")
opens=ffl.vardata("opens")
highs=ffl.vardata("highs")
lows=ffl.vardata("lows")
closes=ffl.vardata("closes")
set oexcel=createobject("excel.application")
oexcel.visible=true
oexcel.workbooks.add
for i=1 to ubound(dates)
oexcel.cells(i,1).value=dates(i)
oexcel.cells(i,2).value=opens(i)
oexcel.cells(i,3).value=highs(i)
oexcel.cells(i,4).value=lows(i)
oexcel.cells(i,5).value=closes(i)
next
%>
<%
dates=ffl.vardata("dates")
opens=ffl.vardata("opens")
highs=ffl.vardata("highs")
lows=ffl.vardata("lows")
closes=ffl.vardata("closes")
set oexcel=createobject("excel.application")
oexcel.visible=true
oexcel.workbooks.add
for i=1 to ubound(dates)
oexcel.cells(i,1).value=dates(i)
oexcel.cells(i,2).value=opens(i)
oexcel.cells(i,3).value=highs(i)
oexcel.cells(i,4).value=lows(i)
oexcel.cells(i,5).value=closes(i)
next
%>
不錯.最好能寫入到一個EXCEL文件中,而不打開文件.對新增的K線能自動加入.