By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,822 Members | 1,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,822 IT Pros & Developers. It's quick & easy.

how to generate csv files

P: n/a
Hi

in my form (windows from) 've several text boxes,lable controls and drop
down boxes and a button.
when i click on this button then the entered in all the textboxes and data
presented on label and dropdown box es must be saved into .csv files .

can anybody tell me how to do this one.

its very urgent
Thanx in advance
Yoshitha
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Something like this?

Dim fs As FileStream = New FileStream(strFilename, FileMode.OpenOrCreate,
FileAccess.ReadWrite)

Dim w As StreamWriter = New StreamWriter(fs)

w.BaseStream.Seek(0, SeekOrigin.End)

w.Write("Field1, Field2")

w.Write(Microsoft.VisualBasic.vbCrLf)

w.Flush()

w.Close()

"Yoshitha" <gu**********@rediffmail.com> wrote in message
news:uf**************@TK2MSFTNGP12.phx.gbl...
Hi

in my form (windows from) 've several text boxes,lable controls and drop
down boxes and a button.
when i click on this button then the entered in all the textboxes and data
presented on label and dropdown box es must be saved into .csv files .

can anybody tell me how to do this one.

its very urgent
Thanx in advance
Yoshitha

Nov 21 '05 #2

P: n/a
Yoshita,

I saw that you use Outlook Express, please don't multipost (sending more
messages to one or more newsgroups about the same subject). We appreciate it
if you CrossPost (sending one message to more newsgroups), when the subject
can be about the topic of those newsgroups.

Thanks in advance.

Cor
Nov 21 '05 #3

P: n/a
Hi,

These code lines look great. I would like to do the same (or about the same)
with a VBA-enabled application, I mean I would like to extract data and save
it to a CSV file that can be imported somewhere else. Thanks in advance,

A.D.
VB newbie
"JohnFol" <Ou************@WibbleObbble.Com> a écrit dans le message de news:
SM*******************@newsfe6-gui.ntli.net...
Something like this?

Dim fs As FileStream = New FileStream(strFilename, FileMode.OpenOrCreate,
FileAccess.ReadWrite)

Dim w As StreamWriter = New StreamWriter(fs)

w.BaseStream.Seek(0, SeekOrigin.End)

w.Write("Field1, Field2")

w.Write(Microsoft.VisualBasic.vbCrLf)

w.Flush()

w.Close()

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.