Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Use sheet position in tFileInputExcel

Hello,
I want to import only the first sheet of an Excel file by using the position of the sheet (0 or 1). So I disable "All sheets" and enter the position in the column "Sheet (name or position)". This gives an error "The method addSheetName(String, Boolean) in the type ExcelReader is not applicable for the arguments (int, boolean)". Tried to use "0" but then the sheet with the name "0" is not found.
Am I doing something wrong or is this a bug? How can I import only the first sheet without using the name?
Thanks for any suggestions!
0683p000009ME8w.png
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Problem solved, although it's a small bug in Open Studio. This is how I reproduced this behavior.
I've setup a new test set and added all parts step by step to see if I could reproduce this behavior. It occurred again when I set the property type of the tInputFileExcel component to "Repository", select the correct file from the repository and then edit the File Name/Input Stream to "context.fileToImport".
When trying to edit this property, Open Studio provides a pop-up with the options to either "Change to built-in property" or "Update repository connection". I've chosen to revert back to the built-in property and the changed the "Sheet (name or position)" to 0.
Now when I run the job the error about the int input is shown and the job won't run.
So, I removed the component form the job, add it again and set all settings (with "Sheet (name or position)" to 0) and it works. Just don't touch the "Property Type" and I'm fine...
Thanks for the fast replies and your help!
Regards,
Pierre

View solution in original post

26 Replies
Anonymous
Not applicable
Author

Hi,
Please show us your component setting screenshot of tFileInputExcel. Did you add quotes around the position?
Best regards
Sabrina
Anonymous
Not applicable
Author

"0" is the string representation and not a 0 integer position
Check using 0 instead of "0"
Vaibhav
Anonymous
Not applicable
Author

Hi Sabrina,
Thanks for your reply. I've added the screen shot to my post. I tried adding quotes around the position but then I get the error as mentioned.
Regards,
Pierre
Anonymous
Not applicable
Author

Hi,
Quotes should not be added around sheet position. The sheet position should be 0 or 1. Is it OK with you when removing quote? Is sheet name(sheet 1, sheet2....) working well for you?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
When I remove the quotes (like in the screen shot) and i run the job I get an error "The method addSheetName(String, Boolean) in the type ExcelReader is not applicable for the arguments (int, boolean)".
If I use the sheet name it works, but the sheet names differ and also the number of sheets, So thats why I need to use the position to always import only the first sheet.
Regards,
Pierre
Anonymous
Not applicable
Author

Somebody an idea how to solve this or work around it? I really need to solve this.
Thanks for any suggestions!
Anonymous
Not applicable
Author

Hi pfacto,
Sorry for delay.
Could you tell us the build version you are using? We will make a testing on it.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Thanks for your reply. I'm using Open Studio for Data Integration version 5.5.0 build r117820-20140523-0610 on a Windows 8.1 machine. I had the same problem with version 5.4.1 build r111943-20131212-1133.
Regards,
Pierre
Anonymous
Not applicable
Author

Hi,
I have made a testing on Talend Open Studio for Data Integration 5.4.1 build r111943. Everything is OK with me.
Please have a look at my screenshots for details.

Best regards
Sabrina
0683p000009MERC.png 0683p000009MEKd.png 0683p000009MECS.png