?
Solved

exporting a money field to excel

Posted on 2016-09-15
3
Medium Priority
?
44 Views
Last Modified: 2016-09-20
Hello,
I am exporting datagridview to excel .
The money field which has values like :
61,999.65  from datagridview gets exported as 61999.65
how to get comma , exported?


 xlRange = xlWorkSheet.Range("H1")
                    xlRange.EntireColumn.NumberFormat = "#,##0.00"
0
Comment
Question by:RIAS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
ElrondCT earned 2000 total points
ID: 41802161
The NumberFormat you show should give the correct display (commas for thousands, two digits after the decimal) in Excel. I'd do it as

 xlWorkSheet.Range("H:H").NumberFormat = "#,##0.00"
0
 

Author Comment

by:RIAS
ID: 41802194
Thanks will try and get back
0
 

Author Closing Comment

by:RIAS
ID: 41806042
Thanks mate!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question