I am creating different worksheets for each Contact.
On each contact (or worksheet) I have labels like Name, Address and so on.
I can have the worksheets created on the fly, but can not copy the Name, Address on the other worksheets.
Please, add any code. Thanks!
<%
'Variables
varName = "My Name"
folder = "xls/" 'folder
'creates a name on the server
path = ("" & folder & mgrName & "-"& month(date()) & day(date()) & year(date()) & ".xls"
'Create Object
set objFSO = createobject("scripting.filesystemobject"
set objCTF = objFSO.CreateTextFile(server.mappath(""&path), true)
objCTF.WriteLine "<html xmlns:x=""urn:schemas-microsoft-comffice:excel"">"
objCTF.WriteLine "<head>"
objCTF.WriteLine "<!--[if gte mso 9]><xml>"
objCTF.WriteLine "<x:ExcelWorkbook>"
objCTF.WriteLine "<x:ExcelWorksheets>"
'Getting each Value from Form
For Each Thing in Request.Form
For iCount = 1 to Request.Form(Thing).Count
'Get out Buttons
if Thing <> "cmdSubmit" then
objCTF.WriteLine "<x:ExcelWorksheet>"
objCTF.WriteLine "<x:Name>" & Request.Form(Thing)(iCount) & "</x:Name>"
objCTF.WriteLine "<x:WorksheetOptions>"
objCTF.WriteLine "<xrint>"
objCTF.WriteLine "<x:ValidPrinterInfo/>"
objCTF.WriteLine "</xrint>"
objCTF.WriteLine "</x:WorksheetOptions>"
objCTF.WriteLine "</x:ExcelWorksheet>"
end if
Next
Next
objCTF.WriteLine "</x:ExcelWorksheets>"
objCTF.WriteLine "</x:ExcelWorkbook>"
objCTF.WriteLine "</xml>"
objCTF.WriteLine "<![endif]--> "
objCTF.WriteLine "</head>"
objCTF.WriteLine "<body>"
objCTF.WriteLine "<table>"
objCTF.WriteLine "<tr><td>First Line </td></tr>"
objCTF.WriteLine "<tr>"
objCTF.WriteLine "<td>"
objCTF.WriteLine "Name"
objCTF.WriteLine "</td>"
objCTF.WriteLine "<td>"
objCTF.WriteLine "Address"
objCTF.WriteLine "</td>"
objCTF.WriteLine "</tr>"
objCTF.WriteLine "</table>"
objCTF.WriteLine "</body>"
objCTF.WriteLine "</html>"
' close the document
objCTF.close
%>
On each contact (or worksheet) I have labels like Name, Address and so on.
I can have the worksheets created on the fly, but can not copy the Name, Address on the other worksheets.
Please, add any code. Thanks!
<%
'Variables
varName = "My Name"
folder = "xls/" 'folder
'creates a name on the server
path = ("" & folder & mgrName & "-"& month(date()) & day(date()) & year(date()) & ".xls"
'Create Object
set objFSO = createobject("scripting.filesystemobject"
set objCTF = objFSO.CreateTextFile(server.mappath(""&path), true)
objCTF.WriteLine "<html xmlns:x=""urn:schemas-microsoft-comffice:excel"">"
objCTF.WriteLine "<head>"
objCTF.WriteLine "<!--[if gte mso 9]><xml>"
objCTF.WriteLine "<x:ExcelWorkbook>"
objCTF.WriteLine "<x:ExcelWorksheets>"
'Getting each Value from Form
For Each Thing in Request.Form
For iCount = 1 to Request.Form(Thing).Count
'Get out Buttons
if Thing <> "cmdSubmit" then
objCTF.WriteLine "<x:ExcelWorksheet>"
objCTF.WriteLine "<x:Name>" & Request.Form(Thing)(iCount) & "</x:Name>"
objCTF.WriteLine "<x:WorksheetOptions>"
objCTF.WriteLine "<xrint>"
objCTF.WriteLine "<x:ValidPrinterInfo/>"
objCTF.WriteLine "</xrint>"
objCTF.WriteLine "</x:WorksheetOptions>"
objCTF.WriteLine "</x:ExcelWorksheet>"
end if
Next
Next
objCTF.WriteLine "</x:ExcelWorksheets>"
objCTF.WriteLine "</x:ExcelWorkbook>"
objCTF.WriteLine "</xml>"
objCTF.WriteLine "<![endif]--> "
objCTF.WriteLine "</head>"
objCTF.WriteLine "<body>"
objCTF.WriteLine "<table>"
objCTF.WriteLine "<tr><td>First Line </td></tr>"
objCTF.WriteLine "<tr>"
objCTF.WriteLine "<td>"
objCTF.WriteLine "Name"
objCTF.WriteLine "</td>"
objCTF.WriteLine "<td>"
objCTF.WriteLine "Address"
objCTF.WriteLine "</td>"
objCTF.WriteLine "</tr>"
objCTF.WriteLine "</table>"
objCTF.WriteLine "</body>"
objCTF.WriteLine "</html>"
' close the document
objCTF.close
%>