Free Support Forum - aspose.com

Error : Unknown value type[com.spring.test.beans.RecBean]

Hello,


Unknown value type[com.spring.test.beans.RecB]
at com.aspose.cells.Cell.setValue(Unknown Source)
at com.aspose.cells.Cells.importCollection(Unknown Source)

I have this error is there someone who already have it ?
When I use open, the excel file didn’t open and when i use save file is saving with out data.
I put my code below :

Thanks in advance

Hi,

I used the following sample code to test importCollection method, it works fine. I have also attached the output file here.

Sample code:

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.getWorksheets().getSheet(0);

ArrayList list=new ArrayList();

//Add few names to the list as string values
list.add(“Names”);
list.add(“laurence chen”);
list.add(“roman korchagin”);
list.add(“kyle huang”);
list.add(“tommy wang”);

com.aspose.cells.Cells cells = workbook.getWorksheets().getSheet(0).getCells();
//Importing the contents of ArrayList to 1st row and first column vertically
cells.importCollection(list,0,0,true);

workbook.save(“D:\files\Bkimpcollection.xls”);

Please make sure that your source result set has proper data, may be there is
some compatibility issue from your source table regarding some data
types (not sure though). This should definitely work for string data types.

Could you simplify your code (as mine) to give us here to reproduce the issue on our end, also give us your template files here. We will check it soon.

Also please try our latest version of the product i.e. v2.5.3.x.

Thank you.