Hi,
i'm experientating with object StreamWriter in asp.net.
This code works: the string is written to an excel sheet, but i have a
questions about it:
how does asp.net know the string must be written to an excel sheet and not a
word or any other format: is this only determined by the file extention
(xls)?
Thanks
Eric
Dim objFileStream As FileStream
Dim objStreamWriter As StreamWriter
filePath = Server.MapPath( "\myapp\exc el")
fileName = filePath & "\myfile.xl s"
objFileStream = New FileStream(file Name, FileMode.OpenOr Create,
FileAccess.Writ e)
objStreamWriter = New StreamWriter(ob jFileStream)
objStreamWriter .WriteLine("thi s text goes into a excel sheet)
objStreamWriter .WriteLine("")
objStreamWriter .Close()
i'm experientating with object StreamWriter in asp.net.
This code works: the string is written to an excel sheet, but i have a
questions about it:
how does asp.net know the string must be written to an excel sheet and not a
word or any other format: is this only determined by the file extention
(xls)?
Thanks
Eric
Dim objFileStream As FileStream
Dim objStreamWriter As StreamWriter
filePath = Server.MapPath( "\myapp\exc el")
fileName = filePath & "\myfile.xl s"
objFileStream = New FileStream(file Name, FileMode.OpenOr Create,
FileAccess.Writ e)
objStreamWriter = New StreamWriter(ob jFileStream)
objStreamWriter .WriteLine("thi s text goes into a excel sheet)
objStreamWriter .WriteLine("")
objStreamWriter .Close()
Comment