[ASP] 讀檔範例
Dim objFSO,oInStream,sRows,arrRows Dim sFileName sFileName = "檔案路徑/test.csv" '*** Create Object ***' Set objFSO = CreateObject("Scripting.FileSystemObject") '*** 確認檔案是否存在 ***' If Not objFSO.FileExists(Server.MapPath(sFileName)) Then Response.write("File not found.") Else '*** 讀取檔案 ***' Set oInStream = objFSO.OpenTextFile(Server.MapPath(sFileName),1,False) Do Until oInStream.AtEndOfStream '重設Email_Item,Email_Item為所要出貨之商品名稱' Email_Item = "" sRows = oInStream.readLine arrRows = Split(sRows,",") '個別寫入配送紀錄表' delivery_num=arrRows(1);Shipped_type=arrRows(4);Shipped_Date=arrRows(2) Response.write "Oid 在開頭="&arrRows(0)&"<br/>" Response.write "Shipped_Date 在開頭="&arrRows(2)&"<br/>" Response.write "Shipped_type 在開頭="&arrRows(4)&"<br/...