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
Solved

Set the format cell in a excel sheet.

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net Report Printing Issue 3 54
VB: Convert 2 dates to specific format 24 52
Datagridview column when exported to Excel changes vb.net 1 19
cannot connect to sqlserver 8 35
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 …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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