title: Continuously save data in label to column in Excel
body: <p>I'm having trouble in saving my data in labels. It always overwrites when I save it. Saving data to column B is okay, but when it turns to column C, it overwrites it. Data in Column B will be erased. Only column C is saved.</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
      {
  
          Microsoft.Office.Interop.Excel.Application OfficeExcel;
          Microsoft.Office.Interop.Excel._Workbook OfficeWorkBook;
          Microsoft.Office.Interop.Excel._Worksheet OfficeSheet;
  
          try
          {
              //Start Excel and get Application object.
              OfficeExcel = new Microsoft.Office.Interop.Excel.Application();
              OfficeExcel.Visible = true;
  
              //Get a new workbook.
              OfficeWorkBook = (Microsoft.Office.Interop.Excel._Workbook)(OfficeExcel.Workbooks.Add(""));
              OfficeSheet = (Microsoft.Office.Interop.Excel._Worksheet)OfficeWorkBook.ActiveSheet;
  
  
              int apple = 10, banana = 11, grapes = 12, orange = 5;
              int apple2 = 20, banana2 = 21, grapes2 = 22, orange2 = 15;
  
  
              switch (cmbDays.SelectedItem.ToString())
              {
                  case "1":
                      lbltotalapple.Text = apple.ToString();
                      lbltotalbanana.Text = banana.ToString();
                      lbltotalgrapes.Text = grapes.ToString();
                      lbltotalorange.Text = orange.ToString();
                      //Add table headers going cell by cell.
  
                      OfficeSheet.Cells[3, 2] = lbltotalapple.Text;
                      OfficeSheet.Cells[4, 2] = lbltotalbanana.Text;
                      OfficeSheet.Cells[5, 2] = lbltotalgrapes.Text;
                      OfficeSheet.Cells[6, 2] = lbltotalorange.Text;
  
                      OfficeExcel.Visible = false;
                      OfficeExcel.UserControl = false;
  
                      // I think is the problem. How do I make it continously save. Not overwriting it.
                      OfficeWorkBook.SaveAs("D:\\test\\test1.xls", Microsoft.Office.Interop.Excel.XlFileFormat.xlExcel7, Type.Missing, Type.Missing,
                                  false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
                                  Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
  
                      OfficeWorkBook.Close();
  
                      break;
  
                  case "2":
                      lbltotalapple.Text = apple2.ToString();
                      lbltotalbanana.Text = banana2.ToString();
                      lbltotalgrapes.Text = grapes2.ToString();
                      lbltotalorange.Text = orange2.ToString();
  
                      OfficeSheet.Cells[3, 3] = lbltotalapple.Text;
                      OfficeSheet.Cells[4, 3] = lbltotalbanana.Text;
                      OfficeSheet.Cells[5, 3] = lbltotalgrapes.Text;
                      OfficeSheet.Cells[6, 3] = lbltotalorange.Text;
  
                      OfficeExcel.Visible = false;
                      OfficeExcel.UserControl = false;
  
                      // I think is the problem. How do I make it continously save. Not overwriting it.
                      OfficeWorkBook.SaveAs("D:\\test\\test1.xls", Microsoft.Office.Interop.Excel.XlFileFormat.xlExcel7, Type.Missing, Type.Missing,
                                  false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
                                  Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
  
                      OfficeWorkBook.Close();
  
                      break;
              }
  
          }
          catch (Exception ex)
          {
                     // do something
          }
  
  
      }
  </code></pre>
  
  <p>How do I get it continuously to save from column B to C and so on? </p>