Hi, i am making an application that will use a access database and an excel spread sheet. It will basically save data from mutiple text box inputted by the user into both excel and access. The part of the application i need help with is below what i am trying to do is learn how to define the table in the excel tables. I have looked around and have had no progress with defining tables field. Below i have included in the comments the definition type for each column. If possible I would like to have a complete list of excel definition for the field I can use with excel oledb. Any help will be surely appreciated. thx.







example:

dim fName as string = textbox1.text

dim lName as string = textbox2.text

dim ClientID as string = textbox3.text



'==========================================================================

' Create a excel workbook with a table named Interviews. The table has 10

' fields: ClientID (autoNumber), lastName (char 20), firstName(20),

' phone(number), email(20), date(date), time(time), Voicemail(true/false),

' callBack(true/false), Scheduled(true/false).

'==========================================================================

Dim conn As New OleDbConnection()

conn.ConnectionString = m_sConn1

conn.Open()

Dim cmd1 As New OleDbCommand()

cmd1.Connection = conn

cmd1.CommandText = "CREATE TABLE Interviews (ClientId autoNumber, lastName varchar(20), firstName varchar(20))" ' and so on.........................................

cmd1.ExecuteNonQuery()

cmd1.CommandText = "INSERT INTO Interviews (ClientId, lastName, firstName) values (" & ClientID & lName & fName & ")" ' and so on............................................

cmd1.ExecuteNonQuery()

conn.Close()