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

Free Support Forum - aspose.com

ImportArray

I am unable to get the following code to work.

Dim sArray(,) As Object = New Object(,) {}
cells1.ImportobjectArray(sArray(, ), 1, 1)

The message is “array subscript expression missing”.

This seems to be be the code to import a two dimensional object.

I have attempted to import a two dimensional array with the same results.

Is there a problem with the code or with the product?

This is not a problem about your code or the product. It is a problem of VS.net.

The two-dimesion array conversion in VB has problems when using the overloaded methods. And in C#, it works fine. So I create a new method. Please download the latest hotfix and have a try.

And please try the following code:

cells1.ImportTwoDimensionArray(sArray, 1, 1)

@amcniece,
Aspose.Excel is no more developed now and discontinued. It is replaced with Aspose.Cells which has more features as compared to Aspose.Excel and also supports advanced features in different versions of MS Excel. Using this new product you can also import multidimensional arrays into Excel files as demonstrated in the following sample code:

// Instantiate a new Workbook
Workbook workbook = new Workbook();
// Get the first worksheet (default sheet) in the Workbook
Cells cells = workbook.getWorksheets().get("Sheet1").getCells();

// Define a multi-dimensional array and store some data into it.
String[][] strArray = { { "A", "1A", "2A" }, { "B", "2B", "3B" } };

// Import the multi-dimensional array to the sheet
cells.importArray(strArray, 0, 0);

// Save the Excel file
workbook.save(dataDir + "IFMDA_out.xlsx");

Here is a detailed article which can be referred to get more information about importing and exporting data in Excel files:
Import and Export Data

For trial purpose, you can download the free version here:
Aspose.Cells for .NET (Latest Version)

A ready to run solution is available here which can be used to test the product features easily.