We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

About Aspose.Cells.GridDesktop.GridDesktop.ImportExcelFile()

“gridDesktop1.ImportExcelFile(dataDir + “Sample.xlsx”)” is no problem .
I see there is three sheets in Sample.xlsx, so I try to change this sentence to “gridDesktop1.ImportExcelFile(dataDir + “Sample.xlsx”, 1)”.I want to load only one of the worksheets but failed, and I can’t see any error messages.
Thank you.

Please share your sample file with us for our testing. We will reproduce the problem and provide our feedback after analysis.

Sample.zip (8.4 KB)
The sample I use is included in the product, and my version is Maybe it is too old?

Sorry, my Aspose.Cells.GridDesktop.dll is


Thanks for the template file.

In Aspose.Cells.GridDesktop, the sheets are zero-based indexed. So, kindly change your line of code:

gridDesktop1.ImportExcelFile(dataDir + “Sample.xlsx”, 1)


gridDesktop1.ImportExcelFile(dataDir + “Sample.xlsx”, 0)

it will work fine to get the first worksheet into grid matrix.

Hope, this helps a bit.