  | 
				VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.   
				 | 
			 
		 
		 
	
		| 上一篇主題 :: 下一篇主題   | 
	 
	
	
		| 發表人 | 
		內容 | 
	 
	
		CPS0204
 
 
  註冊時間: 2014-08-24 文章: 482
 
  第 1 樓
  | 
		 | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		tuberose
 
 
  註冊時間: 2006-05-02 文章: 33
 
  第 2 樓
  | 
		
			
				 發表於: 星期四 四月 02, 2015 1:52 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				*!* 交叉匯率表
 
*!*	Table          : 2
 
*!*	Rows number    : 15
 
*!*	Columns number : 11
 
*!*	Cells number   : 171
 
*!*	...................
 
 
 
Clear
 
Wait Window "Please wait for a moment......" Nowait
 
oIE = Createobject("internetexplorer.application")
 
oIE.Visible = .T.  && or .F.
 
oIE.Navigate("http://yamstock.megatime.com.tw/rate.htm")
 
tStartSecond = Seconds()
 
Do While oIE.Busy = .T. Or oIE.ReadyState#4
 
    If Seconds() - tStartSecond > 10  && Or 10+
 
        Exit
 
    Endif
 
    Inkey(0.5)
 
Enddo
 
Wait Window "一共有 Table 数为:" + Str(oIE.Document.getelementsbytagname("Table").Length) Timeout 2
 
 
Create Cursor 交叉匯率表 ( 幣锺 C(6), 美金 C(6), 台幣 C(6), 日圓 C(6), 港幣 C(6), 人民幣 C(6), ;
 
    英鎊 C(6), 歐元 C(6), 加幣 C(6), 澳幣 C(6), 泰銖 C(6), 紐幣 C(6), 南非幣 C(6) )
 
 
objTable = oIE.Document.getElementsByTagName("table").[2]
 
 
nRows = 0
 
For Each objRow In objTable.Rows
 
    nRows = nRows + 1
 
    If nRows > 3
 
        Insert Into 交叉匯率表 Values ( objRow.cells(0).innertext, ;
 
            objRow.cells(1).innertext, objRow.cells(2).innertext, ;
 
            objRow.cells(3).innertext, objRow.cells(4).innertext, ;
 
            objRow.cells(5).innertext, objRow.cells(6).innertext, ;
 
            objRow.cells(7).innertext, objRow.cells( .innertext, ;
 
            objRow.cells(9).innertext, objRow.cells(10).innertext, ;
 
            objRow.cells(11).innertext, objRow.cells(12).innertext )
 
    Endif
 
Next
 
 
oIE.Quit()
 
 
Select 交叉匯率表
 
Go Top
 
Browse Last | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		CPS0204
 
 
  註冊時間: 2014-08-24 文章: 482
 
  第 3 樓
  | 
		
			
				 發表於: 星期四 四月 02, 2015 7:14 pm    文章主題: a | 
				     | 
			 
			
				
  | 
			 
			
				| 可以了,謝謝大大 | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		 | 
	 
 
  
  	 
	    
  	   | 
 	
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
  | 
   
  
		 |