String dataToWrite = "Sheet # " + sheetNumber + "Row # " + j + "Cell # " + cell1.getCellNum() + "has a different data.. File 1 Cell has " + cell1 + "Whereas File2 has " + cell2 + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
outputStream.write(dataToWrite.getBytes());
return false;
}
HSSFCellStyle cell1Style = cell1.getCellStyle();
HSSFCellStyle cell2Style = cell2.getCellStyle();
if (cell1Style == null || cell2Style == null)
{
String dataToWrite = "Sheet # " + sheetNumber + "Row # " + j + "Cell # " + cell1.getCellNum() + "has a no cell style.. File 1 Cell has " + cell1 + "Whereas File2 has " + cell2 + "\n";
outputStream.write(dataToWrite.getBytes());
return false;
}
else
{
short cell1BorderBottom = cell1Style.getBorderBottom();
short cell1Alignment = cell1Style.getAlignment();
short cell1BorderLeft = cell1Style.getBorderLeft();
short cell1BorderRight = cell1Style.getBorderRight();
short cell1BorderTop = cell1Style.getBorderTop();
short cell1BorderColor = cell1Style.getBottomBorderColor();
short cell1DataFormat = cell1Style.getDataFormat();
short cell1BackgroundColor = cell1Style.getFillBackgroundColor();
short cell1FillForegroundColor = cell1Style.getFillForegroundColor();
short cell1FillPattern = cell1Style.getFillPattern();
short cell1LeftBorderColor = cell1Style.getLeftBorderColor();
short cell1RightBorderColor = cell1Style.getRightBorderColor();
short cell1VerticalAlignment = cell1Style.getVerticalAlignment();
boolean cell1WrapText = cell1Style.getWrapText();
short cell1Rotation = cell1Style.getRotation();
short cell2BorderBottom = cell2Style.getBorderBottom();
short cell2Alignment = cell2Style.getAlignment();
short cell2BorderLeft = cell2Style.getBorderLeft();
short cell2BorderRight = cell2Style.getBorderRight();
short cell2BorderTop = cell2Style.getBorderTop();
short cell2BorderColor = cell2Style.getBottomBorderColor();
short cell2DataFormat = cell2Style.getDataFormat();
short cell2BackgroundColor = cell2Style.getFillBackgroundColor();
short cell2FillForegroundColor = cell2Style.getFillForegroundColor();
short cell2FillPattern = cell2Style.getFillPattern();
short cell2LeftBorderColor = cell2Style.getLeftBorderColor();
short cell2RightBorderColor = cell2Style.getRightBorderColor();
short cell2VerticalAlignment = cell2Style.getVerticalAlignment();
boolean cell2WrapText = cell2Style.getWrapText();
short cell2Rotation = cell2Style.getRotation();
if (cell1BorderBottom != cell2BorderBottom)
{
equal = false;
String dataToWrite = "Sheet # " + sheetNumber + "Row # " + j + "Cell # " + cell1.getCellNum() + "has a different Bottom Border" + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
outputStream.write(dataToWrite.getBytes());