| View previous topic :: View next topic |
| Author |
Message |
Montse Guest
|
Posted: Tue May 13, 2003 1:24 am Post subject: VB - Define the decimals in a cell of a sheet |
|
|
Hello,
I am working with Visual Basic, and I am updating a cell with a value that is a number with decimals.
Well, the cell rounf off the number and don't put the decimals.
My example is:
oSheet.GetCellByPosition(lColumn,lRow).Value = "1456,62"
And in the cell really appears => 1457,00
Can you tell why? or How I can format the cell with decimals?
Thank you very much.
Bye. |
|
| Back to top |
|
 |
Montse Guest
|
Posted: Wed May 14, 2003 1:43 am Post subject: |
|
|
Hi,
I have found the problem.
The value had incorrect format, because the value contained "," and it hope a "." as a decimal separator.
- When I put:
oSheet.GetCellByPosition(lColumn,lRow).Value = "1456,62"
The cell contains: 1456
- And when I put:
oSheet.GetCellByPosition(lColumn,lRow).Value = "1456.62"
The cell contains: 1456.62
I'm not sure if this problem is due to a parameter of the sheet.
Bye |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|