Seven Stars

How to gather together two files to one file with two types

Hello

 

I have two input Excel files  : one file in String, and an other in Double.

I want gather together these files in a single Excel file. But the matter is : the output file is in a type.

 

The first file is : 

Column A(String)    Column B(String)   Column C(String)          Column D(String)

Month                           January                    February                     March

 

The second file : 

Column A (String)   Column B(Double)   Column C(Double)          Column D (Double)

ListA                        1573,12                      1335,24                               1114,58

ListB                           954,12                      2124,14                                1254,36

 

 

 I want have this output file : 

Column A(String)    Column B(String +Double)   Column C(String+Double)          Column D(String+Double)

Month                      January                                      February                                  March 

ListA                        1573,12                                        1335,24                                    1114,58

ListB                           954,12                                        2124,14                                  1254,36

 

I tried to use the component tUnite or tMap but I can't have two types in a single file (String and Double). 

 

This is error log of tUnite.

Error in the component's properties:Type mismatch: cannot convert from String to Double

Type mismatch: cannot convert from String to Double

Type mismatch: cannot convert from String to Double

Type mismatch: cannot convert from String to Double

Type mismatch: cannot convert from String to Double

Type mismatch: cannot convert from String to Double

 

Thanks in advance !!!!!

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: How to gather together two files to one file with two types

Hello,

You can use tConvertType component to convert your Double data type to String automatically, and thus avoid compiling errors. And then use the component tUnit to merge data.

The workflow looks like:tFileInputExcel_1------------------------->tUnit------------>Output

                                      tFileInputExcel_2-->tConvertType(convert Double to String)--->

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
1 REPLY
Moderator

Re: How to gather together two files to one file with two types

Hello,

You can use tConvertType component to convert your Double data type to String automatically, and thus avoid compiling errors. And then use the component tUnit to merge data.

The workflow looks like:tFileInputExcel_1------------------------->tUnit------------>Output

                                      tFileInputExcel_2-->tConvertType(convert Double to String)--->

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.