Sign in to follow this  
Followers 0
Klexen

ExcelReadCell unable not pulling format...

4 posts in this topic

When reading cell that has a money value like " $64.30" excel cuts out any 0 that is after the decimal. So you get something like, "$64.3" Also if the value is $24,223.12 I would get "$24223.12" How can I get it to keep the comma?

Any ideas?

Share this post


Link to post
Share on other sites



I have no idea how to change that in excel, but you could use StringSplit() to split the number by the decimal and then insert your own commas every three characters from the right side of the split string.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

This has something to do with the regional settings.There you can change the options for that. basically in Excel the cell value is $24223.12 but excel shows is as $24,223.12 as it is formated as "currency"/number type.The coma is the 1000 separator in the regional settings. "How can I get it to keep the comma?"

Why would you need that?

Share this post


Link to post
Share on other sites

You can set the cell property in Excel to text. This makes it keep all the formating you throw @ it. Worked for me! you do have to type the comma and the zero's but that is kinda obvious.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0