- or download this
{
system("cls");
...
$materialmapping_table_xml->toFile($materialmapping_file, 2);
}
}
- or download this
sub parse_xls_file
{
...
print "Parsed $filename\n";
}
- or download this
sub process_sheet
{
...
my $oWkS = $oBook->{Worksheet}[$iSheet];
...
}
- or download this
my $oBook = $parser->parse($data_folder.$filename);
- or download this
>perl script.pl output.xml Excel\
- or download this
if($map_Cmin >= 0 and $map_Cmin >= 0 and $title_row >= 0){
for(my $iR = $title_row +1; defined $oWkS->{MaxRow} && $iR <= $oWk
+S->{MaxRow} ; $iR++){
...
$active_cell = $oWkS->{Cells}[$iR][$active_col];
$family_cell = $oWkS->{Cells}[$iR][$family_col];
if(defined $internal_cell and defined $active_cell and defined
+ $family_cell and length(decode('cp1252',$internal_cell->{Val})) gt 0
+ and !(length(decode('cp1252',$active_cell->{Val})) gt 0) and length(
+decode('cp1252',$family_cell->{Val})) gt 0)
- or download this
| A | B | C | D | E |
===+========+==========+===========+=========+=========+
...
---+--------+----------+-----------+---------+---------+
5 | yes | item 3 | 1,2 | value 5 | value 4 |
---+--------+----------+-----------+---------+---------+
- or download this
<?xml version="1.0" encoding="UTF-8"?>
<masterdata version="2012-07-27 01:51:57">
...
<item internal="item 3 " pr_family="1" pr1="value 5" pr2="value 4"/>
<item internal="item 3 " pr_family="2" pr1="value 5" pr2="value 4"/>
</masterdata>