Δημιουργία αρχείου office με την ASP.
Από {gr}
Δημιουργία αρχείου office με την ASP.
Η ASP έχει την δυνατότητα να δημιουργεί δυναμικά έγγραφα office.
Απλά εξηγούμε στον browser τι αρχείο δίνουμε για να ξέρει τι να το κάνει.
Με html και CSS για το style του αρχείου.
Στο παρακάτω παράδειγμα δημιουργία αρχείου word
<%
Response.ContentType = "application/msword"
Response.AddHeader "Content-Disposition", "attachment;filename=NAME.doc"
response.Write("tip.gr : Επισπευτείτε το tip.gr
" & vbnewline)
response.Write("Με HTML κώδικα για word αρχεία
")
response.Write ("
%>
Και εδώ την δημιουργία αρχείου excel
<%
Response.AddHeader "Content-Disposition", "attachment;filename=members.xls"
Response.ContentType = "application/vnd.ms-excel"
response.write ""
"
response.write "" "
response.write "Name "
response.write "Username "
response.write "Password "
response.write "
response.write "" "
response.write "Alex "
response.write "alex@blabla.com "
response.write "topassword "
response.write "
response.write "
%>