Hi thanks for the idea, I try the following:
public void Function(ref AxOWC10.AxSpreadsheet s, ref OWC10.Range r)
{
OWC10.Worksheet ws = s.ActiveSheet;
OWC10.Range ur = ws.UsedRange;
OWC10.Range ra = (OWC10.Range) ws.get_Range(ws.Cells[ur.Row +
ur.Rows.Count + 1, r.Column], ws.Cells[ur.Row + ur.Rows.Count + 1,
ur.Column + ur.Columns.Count]);
ra.Value2 = "Testing";
ra.HorizontalAlignment = OWC10.XlHAlign.xlHAlignLeft;
}
but it complain with:
Property, indexer, or event 'HorizontalAlignment' is not supported by the
language; try directly calling accessor methods
'OWC10._Range.get_HorizontalAlignment()' or
'OWC10._Range.set_HorizontalAlignment(OWC10.XlHAlign)'
I am not sure how the syntax should be. Thanks in advance.
cheers,
andrew
Josh Sale said:
In my experience, OWC seems to correctly handle justification. I'm just
doing stuff like:
myRange.HorizontalAlignment = xlRight
josh