Vb.Net - Set Excel Column to Special

Posted on 2014-08-07
Last Modified: 2014-09-08
Good Day Experts!

I have a bit trouble with exporting my DataGrid to Excel.  When I have issue with values like 2.01E+111 in and Excel spreadsheet I just format the column to "Special" and it displays the correct/full value.  

How do I set this column to "Special" programatically so when I export from VB.Net DataGrid I see the full value?

Thanks for the help,
Question by:Jimbo99999
    LVL 25

    Accepted Solution

    I would format it as "text", ..and see if that works.

    cells.NumberFormat = "@"

    Author Comment

    Thanks for responding. I currently had it as you have indicated.  Unfortunately, at this moment, I have lost my MainForm.vb  to:

     Error      11      Unable to open module file 'C:\Documents and Settings\...MainForm.vb': System Error &Hc0000006&      


    Author Closing Comment

    Thanks, I have it working now.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    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…
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 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

    11 Experts available now in Live!

    Get 1:1 Help Now