0

I use Visual Studio 2008, Platform: Windows CE.

I can query data output right. Next step I am going to create an Excel file.

private void SaveToExcel()
{
        try
        {
            con.Open();
            string sql = 
            " SELECT * "
            " FROM dataTable ";
            SqlCeCommand command_ = new SqlCeCommand(sql, con);
            SqlCeDataReader reader = command_.ExecuteReader();

            while (reader.Read())
            {
                //###CREATE EXCEL FILE HERE###
            }

            con.Close();
        }
        catch (Exception ex)
        {
            MessageBox.Show("Data to Excel:" + ex.Message);
            con.Close();
        }
}

I tried IronXL added a reference to my project, but it does not support.

I need to export data to Excel or .csv file.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Taq Atom
  • 3
  • 2

0 Answers0