Solved

Set the format cell in a excel sheet.

Posted on 2009-04-01
1
341 Views
Last Modified: 2012-05-06
Hi,
im writting data back to an excel sheet. But there is one cell that i need to set the format to Number with few decimals. At the moment the cells are formatted as general.
So how can i change the format type in excell sheet from vb.net?
0
Comment
Question by:arcross
1 Comment
 
LVL 27

Accepted Solution

by:
bluntTony earned 500 total points
Comment Utility
I think to set the cell format you can use something similar to this:
wb.Worksheets("Sheet1").Columns("A:A").NumberFormat = "#,#.00"
This example sets the format of column A  to a number with thousand seperator and two decimal places.
Hope this helps...
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Sending Text to device in .NET 9 31
DataGridView 2 29
Word Template Mail merge with vb.net 4 39
Create XML 5 30
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now