Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
A customer will release daily many xls files with different formats (number of columns can be different) and I have to tranform them into csv files.
How can I do that without defining the schema of xls file into tFileInputExcel ?
Thanks
You need to give more information I'm afraid. If you are converting them to CSV files, then it sounds like the XML files have at least one loop in them. Could there be more than one loop? What are the constraints that you are having to work within? I don't believe any of the standard Talend components will do this for you I'm afraid. However, you can almost certainly use a bit of Java to potentially achieve this.
Hi @rhall
I have to convert XLS files and not XML files.
But I don't know the number of columns of each XLS file I will have to convert every day.
Sorry, I'm not firing on all cylinders today. XLS makes it easier. Do you know the maximum number of columns that could be received? If so, set up your input schema to be the maximum number of columns and inside your job whittle those down to only those which are populated with data.
Thanks for feedback.
But I don't see how to whittle those down to only those which are populated with data...
With which component between tFileInputExcel and tFileOuputDelimited ?
There isn't a component to do this, but you can do it with a bit of Java code. Using something like a tJavaFlex you can test the contents of each of the columns from left to right. The first one that is empty will be where your columns stop. Now if you want, you can prepare your CSV row while doing this and simply output 1 column from this component and send it to your output.