Unable to get value for Excel field "..." of class.lang.String...!?

Hi there!

What's that strange message?? It finds the titles, but it doesn't find the value in the sheet, what is that?


Regards, Jan

dev_34's picture
204
Joined: Feb 25 2019 - 6:20am
Last seen: 1 year 1 month ago

removing the empty row below of the titles does also not help. (?)

dev_34 - 4 years 3 months ago

trying it without a group files does also not solve that issue!!

dev_34 - 4 years 3 months ago

"trying it without a group files does also not solve that issue!!"

I MEANT:

"trying it without a group field does also not solve that issue!!"

dev_34 - 4 years 3 months ago
show 3 more...

After removing the empty row below of titles, now i got same error for field "Strasse Nr.", before it was "Namen Firmenkunde". Your app seems to have problems with a simple "hello world" application, can't really believe that...

dev_34 - 4 years 3 months ago

forum-related question: why i got confirmations mails on my OWN mailbox for my OWN conmments? does also not make sense in my opinnion...

dev_34 - 4 years 3 months ago

8 Answers:

This happens when the value in the Excel sheet that you're trying to use as the datasource does not match with the data type you've specified.

hozawa's picture
176567
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago

In Jaspersoft Studio, all columns are defined as java.lang.String -> that should not matter which values are in excel sheet! Values in excel sheet my be "0" or "my text" - that should not matter.* (But it's NOT a number, it's a string in that problematic row)

* But not vice versa - int datatype in Jaspersoft Studio does not match with string in excel sheet, or genereally, the datasource. (whatever it is..)

Jaspersoft Studio seems to have serious problems with a simple hello world app - that's a lil bit strange in my opinion...

Maybe the problem is that the file was exported from LibreOffice Calc to .xlsx format...?

dev_34's picture
204
Joined: Feb 25 2019 - 6:20am
Last seen: 1 year 1 month ago

...can't believe that there is no solution for such a simple problem!

dev_34's picture
204
Joined: Feb 25 2019 - 6:20am
Last seen: 1 year 1 month ago

Problem still exists...

dev_34's picture
204
Joined: Feb 25 2019 - 6:20am
Last seen: 1 year 1 month ago

Now i will test it with the new version 6.9.0, i will not wonder if the problem still persists...;-)

Best regards, Jan



...yes, i was right. Problem still persists.

How to set the data type for a column? Can't see any options related it it. I can only see "Stretch Type" and "Position Type", which are layout things.

Where is the "datatype" setting for a field/column???

dev_34's picture
204
Joined: Feb 25 2019 - 6:20am
Last seen: 1 year 1 month ago

Same Problem here.

I just tried to see if Jasper might be useful to me, but on my first report i got the same error. I tried to change the data type of the field, but it doesnt work. It also seems that this problem exists with every field from the Excel, as it doesnt work if i just remove the field that had the error.

However, i just tried to build a report that based on a .CSV and it did work. Is it possible that Jasper has a Problem with Excel?

r.ritzal's picture
Joined: Sep 24 2019 - 7:55am
Last seen: 3 years 8 months ago

I'm getting the same error when attempting use a .csv file as a data source - "net.sf.jasperreports.engine.JRException: Unable to get value for CSV "weight" of class java.lang.Integer".  The weight column contains nothing more than integers. The .csv file was exported from DBeaver. Does anyone have ideas on what causes the error?

wilson3838's picture
Joined: Mar 16 2021 - 8:03am
Last seen: 1 year 12 months ago

I'm getting type number as format of excel cell and i modified type of colum as java.math.BigDecimal in jasper, after read fileds.
It's working.

beatrice.guardini's picture
Joined: Sep 7 2016 - 12:22am
Last seen: 2 months 3 weeks ago
Feedback
randomness