OnHalfEmptyEdgeRow
(
ExcelTableReader.ExcelTableRow oRow,
Boolean bVertex1IsEmpty
)
{
Debug.Assert(oRow != null);
AssertValid();
Range oVertex1Cell = oRow.GetRangeForCell(
EdgeTableColumnNames.Vertex1Name);
Range oVertex2Cell = oRow.GetRangeForCell(
EdgeTableColumnNames.Vertex2Name);
Range oEmptyCell = bVertex1IsEmpty ? oVertex1Cell : oVertex2Cell;
Range oNonEmptyCell = bVertex1IsEmpty ? oVertex2Cell : oVertex1Cell;
String sEmptyRangeAddress = ExcelUtil.GetRangeAddress(oEmptyCell);
String sNonEmptyRangeAddress = ExcelUtil.GetRangeAddress(oNonEmptyCell);
String sErrorMessage = String.Format(
"Cell {0} contains a vertex name but cell {1} is empty."
+ " You can include an empty row, which will be ignored,"
+ " but you can't include a half-empty row."
+ "\r\n\r\n"
+ "You can fix the problem by entering a vertex name in {1} or"
+ " deleting the name in {0}."
,
sNonEmptyRangeAddress,
sEmptyRangeAddress
);
OnWorkbookFormatError(sErrorMessage, oEmptyCell);
}