473,480 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Currency values in Excel to VB2005

I am using the Microsoft Excel driver (DriverID 790) to process data in
an Excel spreadsheet. One of the columns is money, but was orinally
formatted as General. So a value in the spreadsheet of say 462.97 came
into the application as 462.969999999999, which is of course an invalid
value for currency, not only to say not the correct monetary value.
Changing the format of the cells to currency fixes the value and of
course looks fine in Excel. But now when I read the value in, it comes
in as 462.9700. Still an invalid currency value even if the extra
decimal places are always zero. So now I have to account for those
extra zeros and ignore them, which I do not like having to do. Is this
a known bug in the driver? Is it fixable? I tried all different
combinations of cell formatting I could think of, but nothing helps.

Mar 1 '06 #1
1 1556

<za***@construction-imaging.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
I am using the Microsoft Excel driver (DriverID 790) to process data in
an Excel spreadsheet. One of the columns is money, but was orinally
formatted as General. So a value in the spreadsheet of say 462.97 came
into the application as 462.969999999999, which is of course an invalid
value for currency, not only to say not the correct monetary value.
Changing the format of the cells to currency fixes the value and of
course looks fine in Excel. But now when I read the value in, it comes
in as 462.9700. Still an invalid currency value even if the extra
decimal places are always zero. So now I have to account for those
extra zeros and ignore them, which I do not like having to do. Is this
a known bug in the driver? Is it fixable? I tried all different
combinations of cell formatting I could think of, but nothing helps.


It's not really an invalid currency value. Have you tried pasting the value
into the cell?

Mar 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1974
by: alien2_51 | last post by:
At some point after running this report the "Wholesale Price" column data type in the excel spread sheet changes from Currency to General... It seems to ba around the 300th or so row but varies......
1
1480
by: Michael | last post by:
Hi everyone. Thanks again in advance for any help I can get. I am running a function that runs a query and exports it to excel using DoCmd.TransferSpreadsheet acExport,...
3
2018
by: Dave Stone | last post by:
This question appeared years ago in the context of Acc2K and SQL Server 7, but no replies were posted. HOWEVER!! It still seems to be a problem with Acc XP and SQL Server 2000. Surely someone has a...
11
2933
by: Adrian | last post by:
Hi I want to use the following declarations but vb dotnet keeps complaining that currency can't be used because it private ? I have tried it in a module and in the declaration pare same error!...
6
2278
by: Darrell Wesley | last post by:
A VB2003 application upgraded to VB2005 that builds an Excel spreadsheet. Everything appears to work correctly except that the Excel object does not go away it is still in the Process list in task...
6
14797
by: gumbystation | last post by:
I am looking to take data from an excel spreadsheet into a csharp application to manipulate the data in various ways. Currently, I am using VS2005 (self-taught C#) and Excel 2000. I have...
0
1264
by: kylancal | last post by:
When I launch a new instance of Excel from Visual Basic, my add ins don't work. I need to remove them and add them back in through code. This is very annoying as a button pops up alerting me that...
5
2785
by: Paul Miller | last post by:
I'm looking at doing some currency calculations in some Python code integrated with a C++ application. I want to be able to come up with the same values I get in an Excel spreadsheet. I've been...
1
2225
by: Vae07 | last post by:
Ok so here is a brief summary of my problem. I need a pop up form that submits input text box information to a pocket excel workbook upon a command botton click. Text box inputs are checked for...
0
7049
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6912
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.