Solved

Set the format cell in a excel sheet.

Posted on 2009-04-01
1
342 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

930 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

12 Experts available now in Live!

Get 1:1 Help Now