If you can already import the data from an Excel file to a data table in your program, you're half way there.
The next step is that you:
- create a connection to SQLite
- create a command which will be used for inserting the data into the database
- create a loop which will loop through the rows in your data table
- for each row you set the parameters for the insert statement and execute it.
To get to the actual coding, have a look at
Getting started with SQLite in C#[
^]
Pseudo example added
string sql = "insert into signals (name, date) values (:name, :date)"
SQLiteCommand insertCommand = new SQLiteCommand(sql, m_dbConnection);
insertCommand.Parameters.Add(new SQLiteParameter("name"));
insertCommand.Parameters.Add(new SQLiteParameter("date"));
foreach(DataRow originalRow in dt.Rows) {
insertCommand.Parameters["name"].Value = originalRow[0].ToString();
insertCommand.Parameters["date"].Value = originalRow[1].ToString();
try {
insertCommand.ExecuteNonQuery();
} catch {
...
}
}