Bharath,
Thanks for the sample, it explains everything:
for(int row=sheet.UsedRange.Row;row<=sheet.UsedRange.End.Row;row++)
{
for(int col=sheet.UsedRange.Column;col<=sheet.UsedRange.End.Column;col++)
{
sheet1.Range[row,col].Text=sheet.Range[row,col].Text;
}
}
>Hi Jerry,
>
>Here is the code to find the end row of the rows in the used range.
>
>int row=sheet.UsedRange.Row
>
>
>Here is the code to find the end column of the columns in the used range.
>
>int col=sheet.UsedRange.Column
>
>
>Please take a look at the attached sample and let me know if you have any queries.
>
>Sample:
Readingspreadsheet.zip
>
>BestRegards,
>
>Bharath