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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unable to move data from an excel file to .csv file

Hi Team,

 

I am trying to extract data from a .xlxs file and to load to a .csv file.

but the issue is under one column in the excel sheet, there are multiple lines in a single row separated by space, for which i am not getting proper data in the CSV file.

 

please help me how to merge all the lines of single row into a single line.

 

thanks in advance.

 

Regards,

Nabarun

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Shong,

Thanks for response.

But i have resolved the issue.

I just use tMap and replace "\n" with " " and the data are perfect in the csv file.

 

Regards,

Nabarun

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hello
Can you please show us an example data and what are your expected result?

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong,

 

sample excel sheet,

 

Name              Age             gender        address

Nabarun           25              male             Ecity

                                                                marathalli

                                                                bangalore

 

Milan                 23              male              Panpana

                                                                  Balasore

                                                                 Odisha

 

I want the above format excel sheet like below in csv file.

 

Nabarun               25           male               Ecity,Marathalli,Bangalore

Milan                     23          male                Panpana,Balaosre, Odisha

 

there are data in several lines under a single row in the Address column in the excel sheet, these needs to be in a single line as i show above separating each line with a comma.

 

Regards,

Nabarun

Anonymous
Not applicable
Author

Hi
i think tDenormalize component can fit your need. Before tDenormalize, fill in the empty field with last non-empty value on tJavaRow, eg:
tFileInputExcel--main--tJavaRow--main--tDenormalize--tFileOutputDelimited.

on tJavaRow: fill in the empty fields with last non-value, take name field for example:

//Code generated according to input schema and output schemai
if(input_row.name==null){
output_row.name=(String)globalMap.get("last_name");
}else{
globalMap.put("last_name",input_row.name);
output_row.name=input_row.name;
}

Hope it helps you!.

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong,

Thanks for response.

But i have resolved the issue.

I just use tMap and replace "\n" with " " and the data are perfect in the csv file.

 

Regards,

Nabarun