Paul Williams
Paul Williams

Reputation: 1598

Getting Started With Writing a File to Excel in Visual Basic

I have data that I want to have written into a Microsoft Excel File.

I found the following question, but this is using a predefined name where as I want to use a Save Command Window on a menu bar.

Coding for Excel sheet in Visual Basic 6

Essentially I have two columns of data, Participant Name & Time In Ring, I want to cycle through an array (I suppose) and have each item on its own line.

Can anyone show me where or how to get started with this?

Upvotes: 3

Views: 1556

Answers (1)

KV Prajapati
KV Prajapati

Reputation: 94625

The easiest way is to create csv document. Use System.IO.StreamWriter class and append comma separated string (e.g 10,abc,10.20) at each line.

You may also use ADO.NET Oledb provider and OfficeInter Op API.

Upvotes: 2

Related Questions