Java and Excel skills

xiaoxiao2021-03-06  72

1. I have resolved the problem of garbled in Excel with POI's HSSF components. Write a method, you can call it. The source code of the method is as follows: public static string getUnicode (string toencoded, string eNCoding) {string retstring = ""; if (toEncoded.equals (") || toEncoded.trim (). Equals (")) {Return Toencoded } Try {byte [] b = toEncoded.getbytes (Encoding); Sun.io.bytetocharconvert000 = sun.io.bytetocharconverter.getConvertRCHARCONVERTER.GETCONVERTER (ENCODING); char [] c = convertor.convertall (b); for (int I = 0; i

转载请注明原文地址:https://www.9cbs.com/read-88943.html

New Post(0)