E
Eric
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\excel")
fileName = filePath & "\myfile.xls"
objFileStream = New FileStream(fileName, FileMode.OpenOrCreate,
FileAccess.Write)
objStreamWriter = New StreamWriter(objFileStream)
objStreamWriter.WriteLine("this 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\excel")
fileName = filePath & "\myfile.xls"
objFileStream = New FileStream(fileName, FileMode.OpenOrCreate,
FileAccess.Write)
objStreamWriter = New StreamWriter(objFileStream)
objStreamWriter.WriteLine("this text goes into a excel sheet)
objStreamWriter.WriteLine("")
objStreamWriter.Close()