List of usage examples for org.apache.poi.util LocaleUtil getUserLocale
@SuppressForbidden("implementation around default locales in POI") public static Locale getUserLocale()
From source file:com.adanac.excel.reader.hssf.ExcelFormatTrackingHSSFListener.java
License:Apache License
/** * Creates a format tracking wrapper around the given listener, using * the {@link Locale#getDefault() default locale} for the formats. */// w w w . j a va 2 s.c om public ExcelFormatTrackingHSSFListener(HSSFListener childListener) { this(childListener, LocaleUtil.getUserLocale()); }
From source file:com.adanac.excel.reader.usermodel.ExcelHSSFDataFormatter.java
License:Apache License
/** * Creates a formatter using the {@link Locale#getDefault() default locale}. */ public ExcelHSSFDataFormatter() { this(LocaleUtil.getUserLocale()); }
From source file:org.apache.tika.parser.microsoft.ExcelParserTest.java
License:Apache License
@Test public void testBigIntegersWGeneralFormat() throws Exception { //TIKA-2025//from w w w .ja va 2s.co m String xml = getXML("testEXCEL_big_numbers.xls").xml; assertContains("123456789012345", xml);//15 digit number assertContains("123456789012346", xml);//15 digit formula Locale locale = LocaleUtil.getUserLocale(); DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale); //16 digit number is treated as scientific notation as is the 16 digit formula assertContains("1" + symbols.getDecimalSeparator() + "23456789012345E15</td>\t" + "<td>1" + symbols.getDecimalSeparator() + "23456789012345E15", xml); }
From source file:org.apache.tika.parser.microsoft.ooxml.OOXMLParserTest.java
License:Apache License
@Test public void testBigIntegersWGeneralFormat() throws Exception { //TIKA-2025/*from w w w. j a v a 2s . co m*/ String xml = getXML("testEXCEL_big_numbers.xlsx").xml; assertContains("123456789012345", xml);//15 digit number assertContains("123456789012346", xml);//15 digit formula Locale locale = LocaleUtil.getUserLocale(); DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale); //16 digit number is treated as scientific notation as is the 16 digit formula assertContains("1" + symbols.getDecimalSeparator() + "23456789012345E+15</td>\t" + "<td>1" + symbols.getDecimalSeparator() + "23456789012345E+15", xml); }
From source file:org.apache.tika.parser.microsoft.TikaExcelDataFormatter.java
License:Apache License
public TikaExcelDataFormatter() { this(LocaleUtil.getUserLocale()); }