class= " lineNumbers "
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
|
class=
># " class= " id= " codeSnippet789805 new ();
мо $workbook = $parser->parse («/ms/user/s/sayantag/Source.xls»);
мо $worksheet1 = $workbook->Worksheet («WF»);
#my $worksheet2 = $workbook->Worksheet («Calc»);
печать $worksheet1;
для $worksheet1 ($workbook->worksheets ()) {
мо ($row_min, $row_max) = $worksheet1->row_range ();
мо ($col_min, $col_max) = $worksheet1->col_range ();
для моего $row ($row_min. $row_max) {for## ##First
для моего $col ($col_min. $col_max) {for## ##Second
мо $cell = $worksheet1->get_cell ($row, $col);
если ($col==0 && $row! && =0 (eq «$curr_etl» >value $worksheet1->get_cell ($row, 0) -)) {
$col++;
мо $src_id = $worksheet1->get_cell ($row, $col) - >value;
печать $src_id;
мо $dbh = DBI->connect («dbi: MSDB2: NQ200001», '', '', {«RaiseError» => 1}) или
умрите «не смогите соединиться к базе данных: $DBI:: errstr»;
$dbh->do (delete от pfnd.funding_journal_vw fj где fj.SRC_ID = «$src_id»));
$dbh->disconnect;
$workbook->close ();
}
}
}
}
|