I need help formatting a cell in Excel from my VB.Net application

Posted on 2011-05-02
Last Modified: 2012-05-11
Hi Experts,
I have a VB.Net application and I need to put a string value in an Excel cell.  The string has two words in it.  I have to put the first word in Size 22 Arial font and the second half of the string in Size 10 Arial font.  I cannot put each word in a separate cell.  They have to be in the same cell.  How can I do this?  How can I apply this type of formatting?

Below is some sample code of how i put the string in Excel from my app:

objWkB.ActiveSheet.Cells(intRows, 1).Value = arrStorage(intCounter, 0)

thank you

Question by:mainrotor
    1 Comment
    LVL 83

    Accepted Solution

    Once you know the start index and length of the word, you can use the Range.Characters

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    754 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

    21 Experts available now in Live!

    Get 1:1 Help Now