public static Cell translateUnicodeValues(Cell cell) {String s = cell.getRichStringCellValue().getString();boolean foundUnicode = false;String lowerCaseStr = s.toLowerCase(Locale.ROOT);for (UnicodeMapping entry : unicodeMappings) {String key = entry.entityName;if (lowerCaseStr.contains(key)) {s = s.replaceAll(key, entry.resolvedValue);foundUnicode = true;}}if (foundUnicode) {cell.setCellValue(cell.getRow().getSheet().getWorkbook().getCreationHelper().createRichTextString(s));}return cell;}

public static Cell translateUnicodeValues ( Cell cell ) { String s = cell . getRichStringCellValue ( ) . getString ( ) ; boolean foundUnicode = false ; String lowerCaseStr = s . toLowerCase ( Locale . ROOT ) ; for ( UnicodeMapping entry : unicodeMappings ) { String key = entry . entityName ; if ( lowerCaseStr . contains ( key ) ) { s = s . replaceAll ( key , entry . resolvedValue ) ; foundUnicode = true ; } } if ( foundUnicode ) { cell . setCellValue ( cell . getRow ( ) . getSheet ( ) . getWorkbook ( ) . getCreationHelper ( ) . createRichTextString ( s ) ) ; } return cell ; }
public static ICell TranslateUnicodeValues(ICell cell){String s = cell.RichStringCellValue.String;bool foundUnicode = false;String lowerCaseStr = s.ToLower();for (int i = 0; i < unicodeMappings.Length; i++){UnicodeMapping entry = unicodeMappings[i];String key = entry.entityName;if (lowerCaseStr.IndexOf(key, StringComparison.Ordinal) != -1){s = s.Replace(key, entry.resolvedValue);foundUnicode = true;}}if (foundUnicode){cell.SetCellValue(cell.Row.Sheet.Workbook.GetCreationHelper().CreateRichTextString(s));}return cell;}
