private static void ReadRow(ExcelWorksheet worksheet, int rowIndex, int colCount, SpreadsheetRow row)
 {
     for (var c = 0; c < colCount; c++)
     {
         var cellContent = worksheet.Cells[rowIndex + 1, c + 1].Value ?? "";
         row.AddCell(cellContent.ToString());
     }
 }
Beispiel #2
0
 private static void ReadRow(ExcelWorksheet worksheet, int rowIndex, int colCount, SpreadsheetRow row)
 {
     for (var c = 0; c < colCount; c++)
     {
         ExcelRange currentCell = worksheet.Cells[rowIndex + 1, c + 1];
         // The first row is special because it contains the headers needed by IsWysiwygFormattedColumn
         if (rowIndex > 0 && IsWysiwygFormattedColumn(row, c) &&
             IsWysiwygFormattedRow(row))
         {
             row.AddCell(BuildXmlString(currentCell));
         }
         else
         {
             var cellContent = worksheet.Cells[rowIndex + 1, c + 1].Value ?? "";
             row.AddCell(ReplaceExcelEscapedCharsAndEscapeXmlOnes(cellContent.ToString()));
         }
     }
 }