OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

VB - Define the decimals in a cell of a sheet

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Montse
Guest





PostPosted: Tue May 13, 2003 1:24 am    Post subject: VB - Define the decimals in a cell of a sheet Reply with quote

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





PostPosted: Wed May 14, 2003 1:43 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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