Wrap doesn't work when writing to excel 2007
Posted: Thu Feb 17, 2011 3:26 am
I'm using the following code to set the wrap property in Excel for all cells. This works fine when writing to exel97 sheets but doesn't work for excel2007. Do you have a fix for this?
aXLS.Sheet[fNewSheetRefNumber].Range[
0,
0,
aXLS.Sheet[fNewSheetRefNumber].LastCol,
aXLS.Sheet[fNewSheetRefNumber].LastRow].FormatOptions := [foWrapText];
aXLS.Sheet[fNewSheetRefNumber].Range[
0,
0,
aXLS.Sheet[fNewSheetRefNumber].LastCol,
aXLS.Sheet[fNewSheetRefNumber].LastRow].FormatOptions := [foWrapText];