Link to home
Start Free TrialLog in
Avatar of Cognize
Cognize

asked on

Need To Format a Excel Worksheet Cell from VB.NET Code

Hi I'm using com objects to format cells in an excel sheet from VB.NET code.

I've got code for simple formatting like so:

EX.Document.worksheets(1).Range("A1:A1000").Font.Bold = True


I need to be able to specify that cells in a certain range should be left padded with zeros where they are less than 4 characters long.

Psuedo Code:

EX.Document.worksheets(1).Range("A1:A1000").Format(Lpad('0',4))

Does such functionality exist to do this??
ASKER CERTIFIED SOLUTION
Avatar of Brian Withun
Brian Withun
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cognize
Cognize

ASKER

Cheers fella, that's the one.