You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-04-07 08:40:00

alche
Member
4 posts

alche said:

how to work with tFileExcelReferencedCellInput excel

Hi,
Can someone use this component and can help me to use it myself ?

i thought that it used to get IN_CELL_REF the excel ref of the cell, and IN_CELL_COLL the column of the cell, and to return OUT_CELL_VALUE_STRING , the value of the cell. but i'm newbie in talend and i dont know 

the job (pic uploaded) dont works 

i dont find any doc and any topics on the web

mini_tfileexcelreferencedcellinput1_20170407-0132.jpg
i added the 4 fields IN_CELL_* at bottom of the schema of the tFileInputExcel component

mini_job-tfileexcelreferencedcellinput1.jpg

i obtain : 

For input string: "LAFARGEHOLCIM"
ERROR: Read cell failed:Row index must >= 1
java.lang.IllegalArgumentException: Row index must >= 1
at de.cimt.talendcomp.excel.SpreadsheetReferencedCellInput.readNextCell(SpreadsheetReferencedCellInput.java:81)
at de.cimt.talendcomp.excel.SpreadsheetReferencedCellInput.readNextCell(SpreadsheetReferencedCellInput.java:135)
at de.cimt.talendcomp.excel.SpreadsheetReferencedCellInput.readNextCell(SpreadsheetReferencedCellInput.java:67)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileInputExcel_2Process(testexcelsheet2.java:1610)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileExcelWorkbookOpen_2Process(testexcelsheet2.java:457)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.runJobInTOS(testexcelsheet2.java:2894)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.main(testexcelsheet2.java:2751)
Exception in component tFileExcelReferencedCellInput_2
java.lang.IllegalArgumentException: Row index must >= 1
at de.cimt.talendcomp.excel.SpreadsheetReferencedCellInput.readNextCell(SpreadsheetReferencedCellInput.java:81)
at de.cimt.talendcomp.excel.SpreadsheetReferencedCellInput.readNextCell(SpreadsheetReferencedCellInput.java:135)
at de.cimt.talendcomp.excel.SpreadsheetReferencedCellInput.readNextCell(SpreadsheetReferencedCellInput.java:67)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileInputExcel_2Process(testexcelsheet2.java:1610)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileExcelWorkbookOpen_2Process(testexcelsheet2.java:457)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.runJobInTOS(testexcelsheet2.java:2894)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.main(testexcelsheet2.java:2751)
[statistics] disconnected
Job testexcelsheet2 terminé à 10:39 07/04/2017. [Code sortie=1]

If i try with tFileExcelSheetInput

mini_job-tfileexcelreferencedcellinput2.jpg

i obtain :

Démarrage du job testexcelsheet2 a 10:46 07/04/2017.
[statistics] connecting to socket on port 3547
[statistics] connected
ERROR: Read column IN_CELL_ROW in row number=11 failed:Unparseable number: "LAFARGEHOLCIM"
java.lang.Exception: Read column IN_CELL_ROW in row number=11 failed:Unparseable number: "LAFARGEHOLCIM"
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2$1Helper_tFileExcelSheetInput_2.fill(testexcelsheet2.java:1171)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileExcelSheetInput_2Process(testexcelsheet2.java:1201)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileExcelWorkbookOpen_3Process(testexcelsheet2.java:1713)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.runJobInTOS(testexcelsheet2.java:2650)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.main(testexcelsheet2.java:2507)
Caused by: java.text.ParseException: Unparseable number: "LAFARGEHOLCIM"
at java.text.NumberFormat.parse(Unknown Source)
at de.cimt.talendcomp.excel.SpreadsheetInput.getDoubleCellValue(SpreadsheetInput.java:409)
at de.cimt.talendcomp.excel.SpreadsheetInput.getDoubleCellValue(SpreadsheetInput.java:366)
at de.cimt.talendcomp.excel.SpreadsheetInput.getIntegerCellValue(SpreadsheetInput.java:429)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2$1Helper_tFileExcelSheetInput_2.fill(testexcelsheet2.java:1168)
... 4 more
Exception in component tFileExcelSheetInput_2
java.lang.Exception: Read column IN_CELL_ROW in row number=11 failed:Unparseable number: "LAFARGEHOLCIM"
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2$1Helper_tFileExcelSheetInput_2.fill(testexcelsheet2.java:1171)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileExcelSheetInput_2Process(testexcelsheet2.java:1201)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.tFileExcelWorkbookOpen_3Process(testexcelsheet2.java:1713)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.runJobInTOS(testexcelsheet2.java:2650)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2.main(testexcelsheet2.java:2507)
Caused by: java.text.ParseException: Unparseable number: "LAFARGEHOLCIM"
at java.text.NumberFormat.parse(Unknown Source)
at de.cimt.talendcomp.excel.SpreadsheetInput.getDoubleCellValue(SpreadsheetInput.java:409)
at de.cimt.talendcomp.excel.SpreadsheetInput.getDoubleCellValue(SpreadsheetInput.java:366)
at de.cimt.talendcomp.excel.SpreadsheetInput.getIntegerCellValue(SpreadsheetInput.java:429)
at fastea_test_pgi.testexcelsheet2_0_1.testexcelsheet2$1Helper_tFileExcelSheetInput_2.fill(testexcelsheet2.java:1168)
... 4 more
[statistics] disconnected
Job testexcelsheet2 terminé à 10:46 07/04/2017. [Code sortie=1]


i'm working with TOS for BD 6.3.1 on windows 7

thanks for help
regards

Last edited by alche (2017-04-07 09:54:19)

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy