Use this collection if you are reading entire Excel file (you don't know exact position of
///cells with data). If writing values, using
This collection contains only allocated cells so it is faster as you avoid ///checking every single cell in a row. You still need to check if a specific cell contains ///any value (it can be empty).
///
///Dim ef As ExcelFile = New ExcelFile("..\TestWorkbook.xls")
///Dim sheet As ExcelWorksheet
///Dim row As ExcelRow
///Dim cell As ExcelCell
///
///For Each sheet In ef.Worksheets
///Console.WriteLine("--------- {0} ---------", sheet.Name)
///
///For Each row In sheet.Rows
///For Each cell In row.AllocatedCells
///If Not cell.Value Is Nothing Then
///Console.Write("{0}({1})", cell.Value, cell.Value.GetType().Name)
///End If
///
///Console.Write(vbTab)
///Next
///
///Console.WriteLine()
///Next
///Next
///
///
///ExcelFile ef = new ExcelFile("..\\..\\TestWorkbook.xls");
///
///foreach(ExcelWorksheet sheet in ef.Worksheets)
///{
///Console.WriteLine("--------- {0} ---------", sheet.Name);
///
///foreach(ExcelRow row in sheet.Rows)
///{
///foreach(ExcelCell cell in row.AllocatedCells)
///{
///if(cell.Value != null)
///Console.Write("{0}({1})", cell.Value, cell.Value.GetType().Name);
///
///Console.Write("\t");
///}
///
///Console.WriteLine();
///}
///}
///
///
///Dim ws As ExcelWorksheet = excelFile.Worksheets.ActiveWorksheet
///
///ws.Cells("B2").Value = "Cell B2."
///ws.Cells(6, 0).Value = "Cell in row 7 and column A."
///
///ws.Rows(2).Cells(0).Value = "Cell in row 3 and column A."
///ws.Rows("4").Cells("B").Value = "Cell in row 4 and column B."
///
///ws.Columns(2).Cells(4).Value = "Cell in column C and row 5."
///ws.Columns("AA").Cells("6").Value = "Cell in AA column and row 6."
///
///
///ExcelWorksheet ws = excelFile.Worksheets.ActiveWorksheet;
///
///ws.Cells["B2"].Value = "Cell B2.";
///ws.Cells[6,0].Value = "Cell in row 7 and column A.";
///
///ws.Rows[2].Cells[0].Value = "Cell in row 3 and column A.";
///ws.Rows["4"].Cells["B"].Value = "Cell in row 4 and column B.";
///
///ws.Columns[2].Cells[4].Value = "Cell in column C and row 5.";
///ws.Columns["AA"].Cells["6"].Value = "Cell in AA column and row 6.";
///
///