none
export all RRS feed

  • Question

  •   how do i export ALL database data to the excel? i want to do this by taking every single record in the databasae to excel

    i can do the export if i just want to export the selected data..  but i failed if i wan to export EVERYTHING OUT

      // Create an array to multiple values at once.

                    string[,] saNames = new string[1, 11];

     

                    for (int i = 0; i < tbl_business.Rows.Count; i++)

                    {

                        for (int j = 0; j < tbl_business.Columns.Count; j++ )

                        {

                            saNames[0, j] = tbl_business.Rows[i].ItemArray[j].ToString();

                          

                            int m = i + 5;

                            oSheet.get_Range("A" + m.ToString(), "K" + m.ToString()).Value2 = saNames; 

                        }

                    }

    any expert can help?


    alain
    • Edited by kkkJoe Sunday, August 24, 2008 2:23 AM no answer
    • Moved by jack 321 Tuesday, August 26, 2008 5:27 AM not a C# general issue (Moved from Visual C# General to Off-Topic Posts (Do Not Post Here))
    Friday, August 22, 2008 2:48 PM

Answers