if(decode('cp1252',$oWkC->{Val}) eq "Confi +gurator mapping") { for (my $iR = $oWkS->{MinRow} +1; defi +ned $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) #### if(defined $market_cel +l_name and defined $market_cell and length(decode('cp1252',$market_ce +ll->{Val})) gt 0 and length(decode('cp1252',$market_cell_name->{Val}) +) gt 0) { if(decode('cp1252' +,$market_cell->{Val}) eq '0') { $ignored_marke +t_string = $ignored_market_string . decode('cp1252',$market_cell_name +->{Val}) . ","; } else { $market_string + = $market_string . decode('cp1252',$market_cell_name->{Val}) . ","; } } } #### my $market_Cmin = -1; my $market_Cmax = -1; my $title_row = -1; for (my $iC = $oWkS->{MinCol}; defined $oWkS->{Max +Col} && $iC <= $oWkS->{MaxCol} ; $iC++) #### } elsif(decode('cp1252',$oWkC->{Val}) eq "Market"){ foreach my $area ( @{ $oWkS->{MergedArea} } ) { if($area->[1] eq $iC and $area->[0] eq $oWkS->{MinRow}){ $market_Cmax = $area->[3]; } } $market_Cmin = $iC; } elsif(decode('cp1252',$oWkC->{Val}) eq "Customer"){ foreach my $area ( @{ $oWkS->{MergedArea} } ) { if($area->[1] eq $iC and $area->[0] eq $oWkS->{MinRow}){ $customer_Cmax = $area->[3]; } } $customer_Cmin = $iC; } elsif(decode('cp1252',$oWkC->{Val}) eq "Brand"){ foreach my $area ( @{ $oWkS->{MergedArea} } ) { if($area->[1] eq $iC and $area->[0] eq $oWkS->{MinRow}){ $brand_Cmax = $area->[3]; } } $brand_Cmin = $iC; } #### for(my $iR = $title_row +1; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++){ $internal_cell = $oWkS->{Cells}[$iR][$map_Cmin]; $active_cell = $oWkS->{Cells}[$iR][$active_col]; $family_cell = $oWkS->{Cells}[$iR][$active_col]; #### $oWkC = $oWkS->{Cells}[$oWkS->{MinRow}][$iC]; if(defined $oWkC) { if(decode('cp1252',$oWkC->{Val}) eq "Configurator mapping") { #### my $map_Cmin = -1; # the first is internal my $map_Cmax = -1; my $artno_col = -1; my $active_col = -1; my $colorzones_col = -1; my $family_col = -1; my $tec_desc_col = -1; my $brand_Cmin = -1; my $brand_Cmax = -1; my $customer_Cmin = -1; my $customer_Cmax = -1; my $market_Cmin = -1; my $market_Cmax = -1; my $title_row = -1; #### #set Brands if($brand_Cmin gt 0 and $brand_Cmax gt 0) { my $brand_string = ""; my $ignored_brand_string = ""; for(my $brandC = $brand_Cmin; $brandC <= $brand_Cmax ; $brandC++) #### #set Brands if($brand_Cmin gt 0 and $brand_Cmax gt 0) { my $brand_string = ""; my $ignored_brand_string = ""; for(my $brandC = $brand_Cmin; $brandC <= $brand_Cmax ; $brandC++) { $brand_cell_name = $oWkS->{Cells}[$title_row][$brandC]; if(defined $brand_cell_name and decode('cp1252',$brand_cell_name->{Val}) ne "Epta std") { $brand_cell = $oWkS->{Cells}[$iR][$brandC]; if(defined $brand_cell and length(decode('cp1252',$brand_cell->{Val})) gt 0) { if(decode('cp1252',$brand_cell->{Val}) eq '0') { $ignored_brand_string = $ignored_brand_string . decode('cp1252',$brand_cell_name->{Val}) . ","; } else { $brand_string = $brand_string . decode('cp1252',$brand_cell_name->{Val}) . ","; } } } } #### if(length($brand_string) gt 0){ $materialmapping_item2->setAttribute('brand',$brand_string); } if(length($ignored_brand_string) gt 0){ $materialmapping_item2->setAttribute('ignore_brand',$ignored_brand_string); }