rounding - MS Excel scientific notation (example: 2.231321654E+01) -


i editing legacy visual basic 6.0 program. reads gpib instrument , obtains raw string in scientific notation. example:

2.231321654e+01 

another line in program processes string suitable input spreadsheet:

round(2.231321654e+01, 1) returns 22.3

i want have 2 decimal places:

round(2.231321654e+01, 2) should return 22.31, no, returns 22.3. why?

another approach:
tried bypass round() processing , have program input raw string directly spreadsheet. still 22.3

yet approach:
bypassed program entirely , manually input 2.231321654e+01 cell in spreadsheet. still 22.3

summary:
want write 2 decimal places spreadsheet. how do it? think original author manipulated cell number properties retain 1 decimal place. how manipulate it? should in code?

it's like

mycell.numberformat = "#.00" 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -