Where are you storing the data from the HTML form? Or are you wanting to post directly to Excel? If you want to post directly to an existing spreadsheet, do you plan on appending or over-writing?
dim fsoObj, sFileName, objtextFile, fieldName, fieldValue
sFileName = server.MapPath("test.csv")
set fsoObj = Server.CreateObject("Scripting.FileSystemObject")
set objtextFile = fsoObj.OpenTextFile(sFileName, 8)
For ix = 1 to Request.Form.Count
fieldName = Request.Form.Key(ix)
fieldValue = fieldValue&Request.Form.Item(ix)&","
Next
objTextFile.WriteLine(fieldValue)
objTextFile.Close
set objTextFile = nothing
set fsoObj = nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.