Java number formats?

Hi.
I am writing a program which contains a simple division code. The operation divides a word's frequency in a file by the number of words in that file. This is a code strip
wordCount = wordsInFile(file2); //number of words in file is obtained from a static method
String w = wordFreq.get(i).toString(); // I get the frequency of the word from an array list
double wf = Double.parseDouble(w);
double normalFreq = wf/wordCount;problem is that sometimes this program produces numbers like this : 8.025682182985554E-4
I have no idea what this means and how to fix it. Is there a specific number format that I should use to avoid this?
Thanks!
Message was edited by:
Yorae

Hi.
I am writing a program which contains a simple
division code. The operation divides a word's
frequency in a file by the number of words in that
file. This is a code strip
wordCount = wordsInFile(file2); //number of
words in file is obtained from a static method
String w = wordFreq.get(i).toString(); // I get the
frequency of the word from an array list
double wf = Double.parseDouble(w);
double normalFreq = wf/wordCount;problem is that sometimes this program produces
numbers like this : 8.025682182985554E-4
I have no idea what this means and how to fix it. Is
there a specific number format that I should use to
avoid this?
Thanks!
Message was edited by:
YoraeTake a look at java.text.DecimalFormat
double normalFreq = wf/wordCount;
DecimalFormat df = new DecimalFormat("#.##");
String output = df.format(normalFreq);
System.out.println("The formatted double is " + output);This should truncate any digits after the second decimal place (I think it rounds it for you but I havent checked).

Similar Messages

  • Java number format exception for BI Publisher query

    I have a data model thats working using one rtf template. Then I created a cross tab query rtf template and when the same data model is executed with the same parameter value, it errors out.
    here is my simple rtf template that I defined:
         for: ITEM_KEY end -->1
    for: ITEM_KEY-->2 for: ITEM_KEY end end --> 3
    For better understanding, 1 is defined as columns of my cross tab, 2 as rows of my cross tab and 3 is the data. I am using version 10.1.3.4ver BIP
    Any help regarding the error is appreciated..
    Thanks in advance
    [011410_035941034][][STATEMENT] Skip migration for cookie (ORA_XDO) is not found
    [011410_035941034][][STATEMENT] /Configuration/xdo.cfg not found.
    [011410_035941064][][STATEMENT] /Configuration/xdo.cfg not found.
    [011410_035941120][][STATEMENT] Logger.init(): *** DEBUG MODE IS ON. ***
    [011410_035941120][][STATEMENT] Logger.init(): LogDir=C:\OracleBI\xmlp\xmlplogs
    [011410_035941430][][STATEMENT] [ PDF GENERATOR ]---------------------------------------------
    [011410_035941430][][STATEMENT] XDO version = Oracle BI Publisher 10.1.3.4.1
    [011410_035941430][][STATEMENT] java.home = C:\Program Files\Java\jdk1.6.0_12\jre
    [011410_035941431][][STATEMENT] XDO_TOP = null
    [011410_035941431][][STATEMENT] Config Path = null
    [011410_035941431][][STATEMENT] Debug Cfg Path= C:\Program Files\Java\jdk1.6.0_12\jre\lib\xdodebug.cfg
    [011410_035941431][][STATEMENT] Font dir = C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\
    [011410_035941432][][STATEMENT] Locale = en-US
    [011410_035941432][][STATEMENT] Fallback font = type1.Helvetica
    [011410_035941432][][STATEMENT] [ PDF GENERATOR PROPERTIES ]----------------------------------
    [011410_035941432][][STATEMENT] digit-substitution=null(not set)
    [011410_035941433][][STATEMENT] font.ALBANY WT J.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANWTJ.ttf
    [011410_035941433][][STATEMENT] font.ALBANY WT K.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANWTK.ttf
    [011410_035941433][][STATEMENT] font.ALBANY WT SC.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANWTS.ttf
    [011410_035941434][][STATEMENT] font.ALBANY WT TC.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANWTT.ttf
    [011410_035941434][][STATEMENT] font.ALBANY WT.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANYWT.ttf
    [011410_035941434][][STATEMENT] font.ANDALE DUOSPACE WT J.normal.bold=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOJB.ttf
    [011410_035941434][][STATEMENT] font.ANDALE DUOSPACE WT J.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOJ.ttf
    [011410_035941435][][STATEMENT] font.ANDALE DUOSPACE WT K.normal.bold=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOKB.ttf
    [011410_035941435][][STATEMENT] font.ANDALE DUOSPACE WT K.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOK.ttf
    [011410_035941435][][STATEMENT] font.ANDALE DUOSPACE WT SC.normal.bold=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOSCB.ttf
    [011410_035941435][][STATEMENT] font.ANDALE DUOSPACE WT SC.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOSC.ttf
    [011410_035941436][][STATEMENT] font.ANDALE DUOSPACE WT TC.normal.bold=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOTCB.ttf
    [011410_035941436][][STATEMENT] font.ANDALE DUOSPACE WT TC.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOTC.ttf
    [011410_035941436][][STATEMENT] font.ANDALE DUOSPACE WT.normal.bold=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUOB.ttf
    [011410_035941436][][STATEMENT] font.ANDALE DUOSPACE WT.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ADUO.ttf
    [011410_035941437][][STATEMENT] font.CG TIMES.italic.bold=type1.Times-BoldItalic
    [011410_035941437][][STATEMENT] font.CG TIMES.italic.normal=type1.Times-Italic
    [011410_035941437][][STATEMENT] font.CG TIMES.normal.bold=type1.Times-Bold
    [011410_035941437][][STATEMENT] font.CG TIMES.normal.normal=type1.Times-Roman
    [011410_035941438][][STATEMENT] font.COURIER NEW.italic.bold=type1.Courier-BoldOblique
    [011410_035941438][][STATEMENT] font.COURIER NEW.italic.normal=type1.Courier-Oblique
    [011410_035941438][][STATEMENT] font.COURIER NEW.normal.bold=type1.Courier-Bold
    [011410_035941438][][STATEMENT] font.COURIER NEW.normal.normal=type1.Courier
    [011410_035941439][][STATEMENT] font.COURIER.italic.bold=type1.Courier-BoldOblique
    [011410_035941439][][STATEMENT] font.COURIER.italic.normal=type1.Courier-Oblique
    [011410_035941439][][STATEMENT] font.COURIER.normal.bold=type1.Courier-Bold
    [011410_035941439][][STATEMENT] font.COURIER.normal.normal=type1.Courier
    [011410_035941440][][STATEMENT] font.DEFAULT.italic.bold=type1.Helvetica-BoldOblique
    [011410_035941440][][STATEMENT] font.DEFAULT.italic.normal=type1.Helvetica-Oblique
    [011410_035941440][][STATEMENT] font.DEFAULT.normal.bold=type1.Helvetica-Bold
    [011410_035941440][][STATEMENT] font.DEFAULT.normal.normal=type1.Helvetica
    [011410_035941441][][STATEMENT] font.GLFALLBACK.normal.normal=truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANWTJ.ttf
    [011410_035941441][][STATEMENT] font.HELVETICA.italic.bold=type1.Helvetica-BoldOblique
    [011410_035941441][][STATEMENT] font.HELVETICA.italic.normal=type1.Helvetica-Oblique
    [011410_035941441][][STATEMENT] font.HELVETICA.normal.bold=type1.Helvetica-Bold
    [011410_035941442][][STATEMENT] font.HELVETICA.normal.normal=type1.Helvetica
    [011410_035941442][][STATEMENT] font.MONOSPACE.italic.bold=type1.Courier-BoldOblique
    [011410_035941442][][STATEMENT] font.MONOSPACE.italic.normal=type1.Courier-Oblique
    [011410_035941443][][STATEMENT] font.MONOSPACE.normal.bold=type1.Courier-Bold
    [011410_035941443][][STATEMENT] font.MONOSPACE.normal.normal=type1.Courier
    [011410_035941443][][STATEMENT] font.SANS-SERIF.italic.bold=type1.Helvetica-BoldOblique
    [011410_035941443][][STATEMENT] font.SANS-SERIF.italic.normal=type1.Helvetica-Oblique
    [011410_035941444][][STATEMENT] font.SANS-SERIF.normal.bold=type1.Helvetica-Bold
    [011410_035941444][][STATEMENT] font.SANS-SERIF.normal.normal=type1.Helvetica
    [011410_035941444][][STATEMENT] font.SERIF.italic.bold=type1.Times-BoldItalic
    [011410_035941444][][STATEMENT] font.SERIF.italic.normal=type1.Times-Italic
    [011410_035941445][][STATEMENT] font.SERIF.normal.bold=type1.Times-Bold
    [011410_035941445][][STATEMENT] font.SERIF.normal.normal=type1.Times-Roman
    [011410_035941445][][STATEMENT] font.SYMBOL.normal.normal=type1.Symbol
    [011410_035941445][][STATEMENT] font.TIMES NEW ROMAN.italic.bold=type1.Times-BoldItalic
    [011410_035941446][][STATEMENT] font.TIMES NEW ROMAN.italic.normal=type1.Times-Italic
    [011410_035941446][][STATEMENT] font.TIMES NEW ROMAN.normal.bold=type1.Times-Bold
    [011410_035941446][][STATEMENT] font.TIMES NEW ROMAN.normal.normal=type1.Times-Roman
    [011410_035941446][][STATEMENT] font.TIMES.italic.bold=type1.Times-BoldItalic
    [011410_035941447][][STATEMENT] font.TIMES.italic.normal=type1.Times-Italic
    [011410_035941447][][STATEMENT] font.TIMES.normal.bold=type1.Times-Bold
    [011410_035941448][][STATEMENT] font.TIMES.normal.normal=type1.Times-Roman
    [011410_035941448][][STATEMENT] font.ZAPFDINGBATS.normal.normal=type1.ZapfDingbats
    [011410_035941449][][STATEMENT] pdf-changes-allowed=0
    [011410_035941450][][STATEMENT] pdf-compression=true
    [011410_035941450][][STATEMENT] pdf-enable-accessibility=true
    [011410_035941451][][STATEMENT] pdf-enable-copying=false
    [011410_035941451][][STATEMENT] pdf-encryption-level=0
    [011410_035941452][][STATEMENT] pdf-font-embedding=true
    [011410_035941452][][STATEMENT] pdf-hide-menubar=false
    [011410_035941453][][STATEMENT] pdf-hide-toolbar=false
    [011410_035941453][][STATEMENT] pdf-no-accff=false
    [011410_035941454][][STATEMENT] pdf-no-cceda=false
    [011410_035941454][][STATEMENT] pdf-no-changing-the-document=false
    [011410_035941454][][STATEMENT] pdf-no-printing=false
    [011410_035941455][][STATEMENT] pdf-open-password=
    [011410_035941456][][STATEMENT] pdf-permissions=0
    [011410_035941456][][STATEMENT] pdf-permissions-password=
    [011410_035941457][][STATEMENT] pdf-printing-allowed=0
    [011410_035941457][][STATEMENT] pdf-replace-smartquotes=true
    [011410_035941458][][STATEMENT] pdf-security=false
    [011410_035941458][][STATEMENT] ------------------------------------------------------
    [011410_035941462][][STATEMENT] WARNING: Old RTF version detected, nested table disabled
    [011410_035941466][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] Type1 font created: Helvetica
    [011410_035941468][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] TrueType font created: C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANWTJ.ttf(0)
    [011410_035941469][oracle.apps.xdo.common.font.FontFactory$FontDef][STATEMENT] Type1 font created: Times-Roman
    [011410_035941481][][ERROR] java.lang.NumberFormatException: For input string: ""
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:468)
         at java.lang.Integer.parseInt(Integer.java:497)
         at oracle.apps.xdo.template.rtf.table.RTFTable.parseColumnContext(Unknown Source)
         at oracle.apps.xdo.template.rtf.table.RTFTable.getTransformedFO(Unknown Source)
         at oracle.apps.xdo.template.rtf.RTF2XSLParser.closeTable(Unknown Source)
         at oracle.apps.xdo.template.rtf.RTF2XSLParser.publishText(Unknown Source)
         at oracle.apps.xdo.template.rtf.RTF2XSLParser.begingroup(Unknown Source)
         at oracle.apps.xdo.template.rtf.io.RTFFilter.write(Unknown Source)
         at oracle.apps.xdo.template.rtf.io.Filter.write(Unknown Source)
         at oracle.apps.xdo.template.rtf.RTF2XSLParser.write(Unknown Source)
         at oracle.apps.xdo.template.rtf.io.Filter.readFromStream(Unknown Source)
         at oracle.apps.xdo.template.rtf.RTFParser.generate(Unknown Source)
         at oracle.apps.xdo.template.rtf.RTF2XSLParser.generateXSL(Unknown Source)
         at oracle.apps.xdo.template.RTFProcessor.process(Unknown Source)
         at oracle.apps.xdo.servlet.RTFCoreProcessor.getXSLFOFile(RTFCoreProcessor.java:155)
         at oracle.apps.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.java:65)
         at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:276)
         at oracle.apps.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:82)
         at oracle.apps.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:552)
         at oracle.apps.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.java:255)
         at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:270)
         at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:250)
         at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:178)
         at oracle.apps.xdo.servlet.XDOServlet.doPost(XDOServlet.java:201)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:94)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    [011410_035941485][][ERROR] [Line 41.172] Internal exception
    [011410_035941486][oracle.apps.xdo.common.font.FontFactory][STATEMENT] type1.Helvetica closed.
    [011410_035941487][oracle.apps.xdo.common.font.FontFactory][STATEMENT] type1.Times-Roman closed.
    [011410_035941487][oracle.apps.xdo.common.font.FontFactory][STATEMENT] truetype.C:\Program Files\Java\jdk1.6.0_12\jre\lib\fonts\ALBANWTJ.ttf closed.
    [011410_035941491][][EXCEPTION] oracle.apps.xdo.XDOException: For input string: ""
         at oracle.apps.xdo.template.rtf.RTFParser.generate(Unknown Source)
         at oracle.apps.xdo.template.rtf.RTF2XSLParser.generateXSL(Unknown Source)
         at oracle.apps.xdo.template.RTFProcessor.process(Unknown Source)
         at oracle.apps.xdo.servlet.RTFCoreProcessor.getXSLFOFile(RTFCoreProcessor.java:155)
         at oracle.apps.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.java:65)
         at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:276)
         at oracle.apps.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:82)
         at oracle.apps.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:552)
         at oracle.apps.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.java:255)
         at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:270)
         at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:250)
         at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:178)
         at oracle.apps.xdo.servlet.XDOServlet.doPost(XDOServlet.java:201)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:94)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    Edited by: user566193 on Jan 14, 2010 2:10 PM

    Drop me the template , 2 templates and xml.. to FUSIONdotOBJECTatGMAILdotCOM
    Something wrong in template or data

  • Number Format in Grid Cell

    I can't get a SQLDataType=8 cell to format with comma separators (ie, 9,999,999).  Have the number format options changed in 12.0?  I can't find the reference table in the Help Docs.  The table in the 11.5 help docs is here (file:///C:/Inetpub/wwwroot/LighthammerCMS/Help/popups/NumberFormatPopup.htm).

    Nothing changed much other than the WB, it's still the basic java number formatting options (which is probably why the help doc popup looks a bit like a javadoc).
    I believe the WB has a bug when setting and retrieving a nested comma in the ColumnFormats property, which itself is a comma separated DT property.
    Use something like this in your PARAM's:
    0.00,#^^#0.00,MM/dd/yy  (just use the double carat for any nested comma and leave the commas to denote column breaks in the list).

  • Java code number formatting

    Wonder if you could help me, I am a student and I've written an applet program for an assignment that creates an array of objects, each object has 3 elements. A string, another string, and a float. The float is multiplied with an integer in another method, and the resulting outputs a number which is the price of a "book". I need to format that result to show two decimal places, but when there is only one number I just get that number instead of the zero, for example if the result is 42.50 I just get 42.5. How do I get that last zero to show up, could you show me an example line of code for this number formatting? Thanks.
    Tyler

    Try to compile and see this piece of code.............I hope it meets ur requirement.
    import java.math.BigDecimal;
    public class Dec {
         public static void main(String s[]) {
         int decimalPlaces = 3;
         int a = 10;
         double b = 100.20000;
    BigDecimal bd = new BigDecimal(a+b);
         // Truncates the big decimal value.
         bd = bd.setScale(decimalPlaces, BigDecimal.ROUND_DOWN);
         String string = bd.toString();
         System.out.println("ANswer"+string);
    Regards,
    Aru

  • Date and Number formatting

    Hi All
    I am getting data from RFC and able to bind it into table. Now I want to format date and numbers into user logged in format. i.e. If user enters country as Germany while registration,date format should be European in table displayed otherwise it should be US format.
    Can any one suggest me how to do it?

    Thanks for your your Help Abhilash. I slightly changed code and now its working. I think this is almost same thing that you discussed.You can see code below.
    Can you help in working with Number  format also? I am getting number format exception. String returned when RFC executed is in 10,000,00. I need to change according to user locale format. I tried doing it in java also. When I remove commas in above string its working fine.
    public java.lang.String DisplayingDateFormat( java.lang.String date )
        //@@begin DisplayingDateFormat()
                        // Current date Format in BW
                             SimpleDateFormat sdf = new SimpleDateFormat("MM.dd.yyyy");
                             String ChangedDateFormat=null;
    try{
    //     sdf.setLenient(false);
    //Parsing String to Date
         Date sqlDate =sdf.parse(date);
    //     wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(" Source date"+ ele.getSched_Date());
    //     wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(" Date converted "+sqlDate);
    //       Getting User Locale
    //Getting Locale Information form Current Session
         Locale userLocale= WDResourceHandler.getCurrentSessionLocale();
         //wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(" User Current Locale "+userLocale );
    //Setting date format ie Short,default etc
         DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, userLocale);
         //wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(" Formatting to user locale ");
         //Converting Date to String
         String newDateString = dateFormat.format(sqlDate);
         //wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(" Changed Date Format "+newDateString);
         //binding to Table UI element
         ChangedDateFormat=newDateString;
    catch(Exception e)
         wdThis.wdGetAPI().getComponent().getMessageManager()
                             .reportException(
                             e.toString(),
                             false);

  • Number Formatting in Excel using HSSF POI

    Hi,
    I am downloading some data into the Excel file using hssf poi and I do my number formatting(either rounded,unrounded or general etc.) in java. The problem is that after the Excel file is created, the values in it behave like text though it shows the format as number. I am not able to plot any graphs or do any mathematical calculations using it. I need to convert it using "=VALUE(data)" before I do so.Is there anyway I can rectify this in the API itself?
    Your suggestions will be very helpful.
    Thanks.

    http://jakarta.apache.org/poi/hssf/quick-guide.html#CellTypes ?
    Otherwise, Apache POI has a mailing list...

  • List of Number format and Date format according to the Locales

    Hallo everyone.
    I am searching for a list or document which includes the number and date formats according to the country locales. Where can I find sort of document?
    Another question: Where can I find the all parameters of swing.properties file?

    "Date - allows the user to enter a date as a parameter. Note that the data type must also be "Date" and the format must be Java date format."
    Page 4-9, Adding Parameters and Lists of Values
    Oracle® Business Intelligence Publisher
    Report Designer's Guide
    Release 10.1.3.4
    Part No. E12187-01

  • Number Formats

    Hello,
    We have an adobe form that we export from SAP and import back to SAP. We need to maintain different locales for different users(US, DE). In SAP, some users have US and some have DE and the number formats are 123,23.99 for US and 123.23,99 for DE on SAP for them. When they export the data to adobe forms, all the users see 123,23.99 irrespective of their locale settings. I tried using viewer's system locale and also default locale (setting the default locale on the form properties to viewer's system locale). but nothing works and everybody sees number on adobe forms as US format. Also when german users import the file back into SAP(SAP - shows in german format), additional 3 zeros are added to the data in SAP.
    Eg: They export 123.23,00(german format-SAP) into adobe forms(here it shows as 123,23.00) and on import back into SAP it becomes 123.23.000,00. Can someone help me here? I am new to this environment.
    Any help is greatly appreciated.
    Thanks

    Hello Sethuram,
    Thanks a lot for replying, but as I mentioned, the adobe needs to show it in different locale formats based on the user's locale. We have US and german clients. So, hardcoding it in java-script might not work. Can we obtain the OS locale setting of the computer the user has and set that in java script? Can u please let me know as to how can that be done, if it can?
    I see "Viewer's system locale and default locale . I see different explanantions for them around. How are they exactly used? Our SAP server is hosted in US. Does that matter?
    Thanks,

  • COPA line item report, Number format  -output type - object list(ALV).

    Hi,
    I am preparing COPA line item report. I want to change number format (two decimal place). I did the changes in form level then I did the changes in drill down report as well and saved as save definition.
    But changes are not reflecting in- output type - object list(ALV).
    Please provide help in this.
    Regards

    HI
    What t-code you are using to write this line item report ?

  • Problem with the number format in the graph axis with Report Generation Toolkit.

    Hi!
    I'm trying to use the Report Generation Toolkit to plot some graphs in Excel.
    My first problem is that I don't know how to configure the number format in the Excel Set Graph Font.vi so that my numbers are correctly displayed in the graph's axis. The only given option is general (0,0) but this is not enough for me, my numbers can get really small so I need engineering notation or fraccional format.
    Second: I also insert a table with the graph source data, but the numbers are not correctly displayed either: for example: 
    0,75 is shown as: 
    0,750000
    but 1,25  is shown as: 
    1!250!000
    My guess is I am making to much or wrong string to number conversions or Excel is getting it wrong but I can't find my way...
    Can someone help me with this?
    Thanks,
    Isabel

    Here is my VI, it's just a trial so it can look messy...
    Thanks,
    Isabel
    Message Edited by Isa_pm on 01-22-2007 01:12 PM
    Attachments:
    Create report.vi ‏96 KB

  • Number formatting issue in Web intelligence report

    Folks ,
    I've an object called ' Serial number' (12 digits long) but when I set this in query filter as a prompt number format gets changed.
    Similar like this:  
    whereas I am expecting to see 123456789123 something like this.
    I made sure that object data type is number while designing universe as well as also format the object ( using format object option) and set as ############. ( 12times #) to forced as 12 digits number.
    When I drag this object in 'result objects' results shows fine but if i add this as 'Query Filters' number gets changed as above pic.
    Any advise ?
    Cheers,
    iTanzir

    Hai Itanzir
    Try to create a dimension variable in universe and choose the data type as string. Please check this and let me know for issues, if any.
    Regards,
    Amala.S

  • Number format issue in XML Publisher from OAF (',.' is replaced by 'u n')

    Hi All,
    I am facing a problem in XML Publisher report. In report I need to display some number fields with 'USD' format. In RTF, data type 'Number' and format '###,##0.00' is selected. If I run concurrent program from oracle core forms using System Administrator > Concurrent > Request, I am able to get correct number format.
    Ex : 123456.00 After Number format : 123,456.00
    Also its working fine from XML Publisher Administrator responsibility (using Preview).
    But problem is when I submit the concurrent request through OAF, I am not getting correct data. ',' is replace by 'u' and '.' is replace by 'n'.
    Ex: 123456.00 In Report 123u456n00
    Checked profile value : ICX: Numeric Character and its set to 1,000.00 at site level.
    Do I need to set character set anywhere in OAF before calling concurrent program?
    I tried to use "alter session set nls_numeric_character = ',.';" by calling stored procedure from OAF. But still its not working.
    Please give me solution for this.
    Regards,
    Sadanand

    Hell - I am running into the same issue? Did you guys find a resolution for this? Please let me know, would really appreciate your help.
    Thanks,
    Dhiraj
    [email protected]

  • How to change number format to international setting

    Hello everyone,
    I need some help on how to change the number format on my phone from the standard US format to an international format with no spacing between the numbers. Currently, my numbers appear as: 0706 343 3456. However, I will like for it to appear as 07063433456. When i recieve calls, the number format is not recognised and I cannot tell who is calling. Same goes for SMS messages. In this part of the world, the number format is not spaced, which is quite frustriating.
    Can anyone please advice me on how to go about this.
    Thanks

    Really? I tried that but it did not work. I restarted the iphone several times but the number format did not change.

  • How to change number format in web reports

    Hi, Experts,
        Simple question, if I want to change the number format on web report as following
    . . . . . . . . Actual
    . . . . . . . . *1000SGD 
      new order   .   341.5
      sales       .   567.45
    if I click "Actual" then select properties, set data format from "in 1000" & "0" to "in 1" & "0.00", nothing changed in web report after refresh.
    if i click one number (for example: 341.5) or "New order" to set data format from "in 1000" & "0" to "in 1" & "0.00", only this row's format is changed, others row still keep old format.
    how to change whole column's data format at once setting?
    thanks in advance.
    Message was edited by: jie miao
    Message was edited by: jie miao

    Hi,
    Logout and login may help you and also Delete the session in SM04  before re login. Some times system will not do complete refresh of data even though you select refresh button.
    With rgds,
    Anil Kumar Sharma .P

  • How do I change the number formatting within a Cell Table in Microsoft Word?

    Hi, I was wondering if someone could help me out on an issue I've been having... I work for an accounting firm and we do a lot of financial statements. 
    I was wondering if we would be able to treat a cell table in Microsoft Word 2007 like I would a cell table in Microsoft Excel. Meaning, I would like to change the formatting of the numbers in the table to the "Accounting" (number) format so it
    aligns by the decimal point and use the $ signs and () for negative numbers.  We do use the link tables feature, however, most of our balancing pages just can't be done in Excel because of the way the text is written. It would be much harder to format
    the text if it were to be typed in Excel. We have also tried  creating an Excel sheet within Microsoft Word but it is the same as linking the tables... Again, a text formatting issue.  The only option is to use tables within Word but how do we change
    the number formatting to a "accounting" (number) format where the numbers would align with the decimal point and use () for the negative numbers. Is there ANY option for us to do this other than manually entering this information in using tabs?  
    If there are no options other than entering it in manually, please consider this as an option for your next software update. I believe that a LOT of people out there will be interested in this feature... My manager and I just attended a webinar on Microsoft
    Advanced Word Tips Tricks and Techniques and 75% of the attending people had this question but no answer.
    Thank you very much for your help!!!!!

    Word does not really have number formatting for table cells. You can align cell contents on the decimal point, though, by setting a so-called decimal tab stop.
    Option 1:
    - Select the cells for which you want to do this.
    - Display the ruler.
    - Click the Tab box on the left hand side of the ruler until the box contains an inverted T with a dot.
    - Click in the ruler where you want the decimal tab.
    Option 2:
    - Select the cells for which you want to do this.
    - Click the arrow in the lower right corner of the Paragraph group on the Home tab of the ribbon.
    - Click the Tabs... button in the lower left corner of the dialog.
    - Specify a tab position in the box, e.g. 1.5".
    - Select the 'Decimal' radio button under 'Alignment'.
    - Click Set.
    - Click OK.
    You will have to type the numbers as they should appear, including the $ for currency and the ( ) for negative numbers.
    Regards, Hans Vogelaar

Maybe you are looking for

  • Can't sync Aperture library with multiple user accounts

    I have created the aperture library on my main computer account and have synced photos to my iPhone with no problem. I created an account for my wife on the computer and she has admin rights. When I try to sync photos from Aperture onto her iPad I ge

  • Front End Tool for JSP

    I'm trying to develop a commerically viable front-end to an existing JSP system.Are there any tools available that make the task of creating a front end(i.e. HTML,XML) easier. For example, nice headers/tabs at the top of each page while keeping usabi

  • System Error in File scenario

    Hi Everybody, I just tried a simple file to file scenario. File was deleted and message was seen in sxi_monitor but file is not created in receiver folder. When checked in RWB, in Message monitoring the message got status as system failure. Both send

  • How can I create a generic listener?

    So I 'm coding a Flash animation where there are two streams of MovieClip objects scrolling both right to left on the top portion of the Stage and left to right on the bottom portion of the Stage. Each object is attached the Stage using attachMovie()

  • Mid 2007 macbook no chime dark screen.

    my mid 2007 macbook will not chime on startup and I am getting no picture. already tried resetting pram, SMC or whatever and removed and replaced the battery. Tried booting from a disk and got nothing, tried booting from my backup and got nothing. It