>>>Most likely you have character field, and Excel does not want to recognize it as numbers when applying NumberFormat. Either reformat it on FoxPro site before importing, or use numeric fields.
>>>
>>Using numeric worked, but the number is adjusted to the right, which I don't like. I think I would rather transform it myself.
>>
>>Thanks again.
>
>If you want to override the aligment for a cell or a column
>
>
> CellOrColumnRef.HorizontalAlignment = -4152
>CellOrColumnRef.HorizontalAlignment = -4131
>
Thanks, Gregory. It's not that simple, since I'm using my generic routine to create XLS from DBF. I'm not certain if we may want to align all numbers to the left, so I better leave the default setting.
If it's not broken, fix it until it is.
My Blog