Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


vb .net 2003 open excel app and format a column to a text or date type

Posted on 2007-10-19
Medium Priority
Last Modified: 2012-08-14
vb .net 2003.  When calling an excel application and writing data to the workseet.  How do you format a column to text or date or general?
Question by:mphillip85
  • 2
LVL 48

Expert Comment

ID: 20111922
You can do it this way

    ' To number
    YourWorkCell.NumberFormat = "@"
    ' To Date
    YourWorkCell.NumberFormat = "m/d/yyyy"

Author Comment

ID: 20112012
I need more of the text format because I have an account number that is preceeded with zeros, so not to let excel strip the zeros I need to format the column as text.

LVL 48

Accepted Solution

jpaulino earned 2000 total points
ID: 20112169

This is text format YourWorkCell.NumberFormat = "@". For number format you use YourWorkCell.NumberFormat = "0.00"


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

577 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