Get first ten rows for preview in a GridView

Hi,

I’m uploading an Excel file into my website.

Whats the best way to preview the first ten rows in a gridview?

The number of rows and columns is variable, but I only want a maximum of 10 rows in the preview.


Hi,

Thanks for your posting and using Aspose.Cells.

Well, you cannot take the preview of your source MS-Excel file. But you can take the image of your worksheet and display it in your website.

Please see the following documentation article which explains how to get the image of your worksheet.
http://www.aspose.com/docs/display/cellsnet/Converting+Worksheet+to+Image

Hi,


Which Aspose product you are using e.g. Aspose. Cells, Aspose.Cells.GridWeb control? Please provide us the required details, so that we could understand your requirement and reply you accordingly.

I suspect and it looks like you are simply importing data (from Excel file) into GridView (.NET web control) using ADO.NET API, I think you may browse the following article (you may specify the select query for OleDbCommand for your needs accordingly):
http://wiki.asp.net/page.aspx/825/loading-excel-data-into-a-gridview/
If this is the case, I am afraid, we cannot help you much as your query is general query and is not relevant to Aspose.Cells or Aspose.Cells.GridWeb control by any means.

Thank you.