0
在Calc中,我将一个单元格值设置为“2006/10/03 13:33:55.448”,Calc说它是标准格式。我与Java这样做的,我想设置的格式 “DD.MM.YY HH:MM:SS AM/PM”:更改日期格式
XNumberFormatTypes xFormatTypes = (XNumberFormatTypes) UnoRuntime.queryInterface(XNumberFormatTypes.class, xNumberFormats);
int myDateFormat = xNumberFormats.addNew("DD.MM.YY HH:MM:SS AM/PM", defaultLocale);
XPropertySet cellRangePropSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, cellRange);
cellRangePropSet.setPropertyValue("NumberFormat", new Integer(myDateFormat));
但细胞STIL看起来是一样的。我是否必须刷新范围以便单元显示“03.10.06 01:33:55 PM”?