One Star

[Resolved]Issue with number of columns for transforming CSV to XLS

Hi all,
I have an issue which is blocking me.
I have a simple file .CSV with 14 columns. I just want to create a .XLS with it because my customer prefers this extension file.
Each time, Talend is transforming in only 1 column file. I don't understand why and I don't know how to prevent it.
I've tried few solutions :
- TFileCopy (and rename) : the xls file has 1 column : failed
- To generate my CSV files, I've used a TJavaFlex. If I create a XLS file inside the java script instead of a CSV file, I have finally only 1 column too : failed
- TFileList : I've tried a lot a things to recover the considered files and then to cut each line string inside a TMap but each time failed.
Probably I did something wrong but I don't know where.
Versions : TOS for DI v 6.2.1, Office 2003
Your help would be appreciated.
Thx in advance.
4 REPLIES
Ten Stars

Re: [Resolved]Issue with number of columns for transforming CSV to XLS

My approach to this situation would be a tFileInputDelimited --> tFileOutputExcel
You'll have to configure the schema on the tFileInputDelimited to match the schema of your file, and sync the columns to your tFileOutputExcel component.
One Star

Re: [Resolved]Issue with number of columns for transforming CSV to XLS

Hi cterenzi,
thx for answering my issue.
Your solution is the solution. In fact, I've already done that but without success.
So thanks to you, I've tried again and in fact my failure came from a bad decimal separator which prevented the data from propagating correctly.
Thank you very much cterenzi.
One Star

Re: [Resolved]Issue with number of columns for transforming CSV to XLS

However I cant' explain why the transformation CSV to xls doesn't match with a simple rename in tFilecopy or why in Java, the creation of an xls file doesn't work as for a csv file.
Mystery...Smiley Wink
Twelve Stars

Re: [Resolved]Issue with number of columns for transforming CSV to XLS

it will be more easy if You attach screenshots, but generally Talend create 1 column when You use default settings for tFileInput delimiter 
default value - ;
so if file really csv - it mean "," delimited - it will be only 1 column in result
-----------