Data transfer using vb.net
<p>I am new to <code>vb.net</code> and very confused at this point. I have experience with vba within excel and have taken a basic vb class at my university but I am clue less when it comes to this. </p>

<p>I have multi projects I would like to try, but I am stuck on how to <strong>transfer data, text string</strong> from one program to the other using a <code>vb.net</code> app! </p>

<p><strong><em>I believe the process I am looking for is data binding? is that correct?</em></strong></p>

<p>The 3 processes I am trying to accomplish.</p>

<ul>
<li>Excel to Excel text or cell transfer/ copy and paste.</li>
</ul>

<p>I have file <strong>A</strong> which is an excel file with rows and columns of data in cells. Then I have file <strong>B</strong> which is a template with graphs and some other formulas. I am trying to use a vb.net app to open file <strong>A</strong> copy all the data and paste into a sheet in file <strong>B</strong>. I have figured out how to open the files but as for the data transfer method I have not found anything.</p>

<pre><code>Private Sub btn_Do_Click(sender As Object, e As EventArgs) Handles btn_Do.Click
    Dim txtpath As String
    Dim csvpath As String = "C:\Temp"
    Dim FileTXT As String
    Dim folderpath As String
    Dim FinalFile As String


    folderpath = "C:\Users\aholiday\Desktop\Data Dump"
    FileTXT = cbo_FileList.Text
    csvpath = "C:\Temp\" &amp; FileTXT &amp; ".csv"
    txtpath = folderpath &amp; "\" &amp; FileTXT &amp; ".txt"
    FinalFile = "C:\Users\aholiday\Desktop\Book1"

    File.Copy(txtpath, csvpath)
    Process.Start("EXCEL.EXE", csvpath)
    Process.Start("EXCEL.EXE", FinalFile)

    File.Delete(csvpath)
End Sub
</code></pre>

<ul>
<li>Access database to a chart in vb.net app.</li>
</ul>

<p>Next I have an vb.net app that has a chart in it. How would I get data from an excel file into it. I have no code for this because I am not sure what the method I need is. I need this to be "live" meaning if someone changes something in the excel file it will update on the chart in the app. But the the first step is getting the data out of excel and into the chart. This is the only example I could find and its for Microsoft access as the data source. It didn't work.</p>

<pre><code>Imports System.Data.OleDb
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs)Handles Button1.Click
    Chart1.Series.Add("Numbers")
    Dim Conn As OleDbConnection = New OleDbConnection
    Dim Provider = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
    Dim dataFile = "C:\Users\aholiday\Desktop\Database11.accdb"
    Conn.ConnectionString = Provider &amp; dataFile
    Conn.Open()

    'Adds data to chart

    Dim cmd As OleDbCommand = New OleDbCommand("Select [Month],[Number] FROM [Table1]", Conn)
    Dim dr As OleDbDataReader = cmd.ExecuteReader
    While dr.Read
        Chart1.Series("Table1").Points.AddXY(dr("Month").ToString, dr("Number").ToString)
    End While
    dr.Close()
    cmd.Dispose()
End Sub
End Class
</code></pre>

<ul>
<li>Excel to vb.net pictures and text string transfer. </li>
</ul>

<p>And last. I have an vb.net app that have textbox and picture boxes in the design layout. I have an excel file with strings of text and pictures within cells. I would like code to copy the text and pictures and place them in the textbox and Picturebox.</p>

<p>I would like to learn how one would accomplish any of those.<strong>Please post any helpful content from sources</strong>. Any suggestions and especially examples would be awesome. Please nothing from Microsoft unless it crystal clear. I have spent about a day researching and googled everything I could think of and have found very little. None that work when I try to use it. </p>

<p>Thank you</p>