D
Dan
Hi,
i have some problem with exporting data from sql server to some formats.
Excel and Word are not a problem, but .txt and .csv do not work properly:
- with .txt, the data are shown (correctly) in the browser but the windows
asking to save or to open the file never appears.
- with .csv, the code below produces an identical excel file as with.xls (no
comma).
Here an extract of the code:
Dim objFileStream As FileStream
Dim objStreamWriter As StreamWriter
....
filecsv = "myfile".xls" '=> this is ok
'filecsv = "myfile".csv" => this produces an excel file just like .xls
'filecsv = "myfile".doc" => this is ok (word file)
'filecsv = "myfile".txt" => this produces no file (windows asking to save or
to open never appears)
' but instead the data are automatically rendered correctly in the browser
....
objFileStream = New FileStream(fileName, FileMode.OpenOrCreate,
FileAccess.Write)
objStreamWriter = New StreamWriter(objFileStream)
....
objStreamWriter.WriteLine(strLine)
....
Do i have to manipulate some parameters in some functions?
Thanks for tips.
Dan
i have some problem with exporting data from sql server to some formats.
Excel and Word are not a problem, but .txt and .csv do not work properly:
- with .txt, the data are shown (correctly) in the browser but the windows
asking to save or to open the file never appears.
- with .csv, the code below produces an identical excel file as with.xls (no
comma).
Here an extract of the code:
Dim objFileStream As FileStream
Dim objStreamWriter As StreamWriter
....
filecsv = "myfile".xls" '=> this is ok
'filecsv = "myfile".csv" => this produces an excel file just like .xls
'filecsv = "myfile".doc" => this is ok (word file)
'filecsv = "myfile".txt" => this produces no file (windows asking to save or
to open never appears)
' but instead the data are automatically rendered correctly in the browser
....
objFileStream = New FileStream(fileName, FileMode.OpenOrCreate,
FileAccess.Write)
objStreamWriter = New StreamWriter(objFileStream)
....
objStreamWriter.WriteLine(strLine)
....
Do i have to manipulate some parameters in some functions?
Thanks for tips.
Dan