How to set last column when hitting Ctrl-End
Posted: Mon Mar 07, 2011 8:23 pm
Hello,
I've converted an old XLSv2 report to XLS4 and one big difference that our users need back is the ability that once they first open the Excel report and hit Ctrl-End, it takes them to the last row/column of data.
The old XLSv2 did no problem, but XLSv4 does not. It does take the user to the last row with no extra code needed, but the column is at 'IU', which is 255.
There is a private variable 'FCol2' in the Rows4 unit that I cannot get to in order to override with code to define the last column. Assigning XLS[0].LastColumn does nothing and neither does XLS[0].Column.LastColumn. I notice that when a new row is written (AddIfNone), there is a call inside that source code function to Result := TXLSRow.Create(FFormats,DEFAULT_FORMAT,FFormatChangeEvent). As soon as this happens, it triggers 'FCol2' to 255 as the default and cannot be overridden.
Please help! :) I've searched the forum here and found nothing.
Thanks,
Nick
I've converted an old XLSv2 report to XLS4 and one big difference that our users need back is the ability that once they first open the Excel report and hit Ctrl-End, it takes them to the last row/column of data.
The old XLSv2 did no problem, but XLSv4 does not. It does take the user to the last row with no extra code needed, but the column is at 'IU', which is 255.
There is a private variable 'FCol2' in the Rows4 unit that I cannot get to in order to override with code to define the last column. Assigning XLS[0].LastColumn does nothing and neither does XLS[0].Column.LastColumn. I notice that when a new row is written (AddIfNone), there is a call inside that source code function to Result := TXLSRow.Create(FFormats,DEFAULT_FORMAT,FFormatChangeEvent). As soon as this happens, it triggers 'FCol2' to 255 as the default and cannot be overridden.
Please help! :) I've searched the forum here and found nothing.
Thanks,
Nick