Solved

Set the format cell in a excel sheet.

Posted on 2009-04-01
1
343 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
ID: 24037907
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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 …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

786 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