• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

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

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 vb.net app:

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

thank you

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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now