Hello!

Firstly, I need a text box and a button. On the click of the button it will send what ever is in the text box into a cell in an excel document. I have this:
Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        Dim NumericTextBox1 As RichTextBox = New RichTextBox()
        NumericTextBox1.Parent = Me

        Dim sFoo As String = TextBox1.Text


2:
        Dim mySW As New IO.StreamWriter(My.Computer.FileSystem.SpecialDirectories.Desktop + "\Repair_Income.xlsx", True)

5:
        mySW.WriteLine(sFoo)
6:
        mySW.Close()

        Close()


    End Sub
It works well apart from when you go to open the Excel file, it says it is saved in the wrong format. I need this excel document to contain formulae so it is important it can be read.

Name:  fgh.png
Views: 3241
Size:  5.1 KB

Secondly, I have these text boxes to show a said formulae. So in the Excel document, values are added and the answer is produced in this window:

Name:  sdf.png
Views: 3590
Size:  6.4 KB

Using Excel as an external information handler may be the wrong way to go about this, so any alternatives are welcome however I cannot get an SQL server to work.

Thanks