Hi, if your "first open cell" refers to a first available cell then you can try the following sample:
Code:
Public Class Form1
Dim oEx As ExcelFile
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
oEx = ExcelFile.Load("C:\Program Files\Nexulator\Schedule.xls")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim sheetEx As ExcelWorksheet = oEx.Worksheets.ActiveWorksheet
For Each cell As ExcelCell In sheetEx.Columns("A").Cells
If cell.Value Is Nothing Then
cell.Value = "TextBox1.Text"
Exit For
End If
Next
oEx.Save("C:\Program Files\Nexulator\Schedule.xls")
End Sub
End Class
I used this
VB.NET Excel component because personally I found it easier then
excel automation, I believe you will find it very easy to use too. Also if your open cell refers to a Selected cell then you can use a sheetEx.ViewOptions.SelectedCells to get or set the current workbooks selected cell and its value.