Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,33 +0,0 @@
|
|||
Set objfso = CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
parent_folder = objfso.GetParentFolderName(WScript.ScriptFullName) & "\"
|
||||
|
||||
Set objcsv = objfso.OpenTextFile(parent_folder & "in.csv",1,False)
|
||||
Set objhtml = objfso.OpenTextFile(paren_folder & "out.html",2,True)
|
||||
|
||||
objhtml.Write(csv_to_html(objcsv.ReadAll))
|
||||
|
||||
objcsv.Close
|
||||
objhtml.Close
|
||||
Set objfso = Nothing
|
||||
|
||||
Function csv_to_html(s)
|
||||
row = Split(s,vbCrLf)
|
||||
'write the header
|
||||
tmp = "<html><head><head/><body><table border=1 cellpadding=10 cellspacing=0>"
|
||||
For i = 0 To UBound(row)
|
||||
field = Split(row(i),",")
|
||||
If i = 0 Then
|
||||
tmp = tmp & "<tr><th>" & replace_chars(field(0)) & "</th><th>" & replace_chars(field(1)) & "</th><tr>"
|
||||
Else
|
||||
tmp = tmp & "<tr><td>" & replace_chars(field(0)) & "</td><td>" & replace_chars(field(1)) & "</td><tr>"
|
||||
End If
|
||||
Next
|
||||
'write the footer
|
||||
tmp = tmp & "</table></body></html>"
|
||||
csv_to_html = tmp
|
||||
End Function
|
||||
|
||||
Function replace_chars(s)
|
||||
replace_chars = Replace(Replace(s,"<","<"),">",">")
|
||||
End Function
|
||||
Loading…
Add table
Add a link
Reference in a new issue