Friday, February 24, 2012

Cell Formatting

Hi,

On importing an XML file using VBA I/O function, I need to apply rules/format to specific Excel 2003 .Cells.

XML
<Column FieldName="ProductReference" FieldNumber="1">
<DataType>character</DataType>
<Format>x(20)</Format>
<Restrictions/>
<Mandatory>true</Mandatory>
<PermittedValues/>
</Column>

If the above XML-lines (strings) are read, I need to apply the following rules/formats to the identified .Cells(x,1):

1.
.Columns("A").NumberFormat = "General" or "Text" ??
2.
That when inputting a value, the user is restricted to 20 Characters
3.
That this is a Mandatory entry field

These values obviously change as per XML Output. Can anyone help, please?Is this related to Crystal Reports?

No comments:

Post a Comment