private String QueryDataSetGetValue(QueryDataSet QDSTable, int i) {
String str = ""
int type = QDSTable.getColumn(i).getDataType();
if (type == Variant.DOUBLE ) {
NumberFormat nf = new DecimalFormat("#");
double d = QDSTable.getDouble(i);
str = nf.format(d);
} else {
str = QDSTable.format(i);
}
return str;
}
參考:用NumberFormat來將數字格式化技巧(頁 1) - JAVA樂園 - 精華區 - 微風論壇 台灣人氣bbs論壇社區 - Powered by Discuz! Archiver
全站熱搜