我不認爲這將有可能1至1 ..你將不得不重寫代碼看起來像下面的例子:
use feature 'say';
use Siebel::COM::App::DataControl;
use TryCatch;
my $app = Siebel::COM::App::DataControl->new(
{
user => 'sadmin',
password => 'sadmin',
host => 'test',
enterprise => 'SIEBEL',
lang => 'ENU',
aom => 'eClinicalObjMgr_enu'
}
);
my $created_by = '0-1';
try {
$app->login();
my $bo = $app->get_bus_object('Account');
my $bc = $bo->get_bus_comp('Account');
$bc->activate_field('Location');
$bc->activate_field('Extension Phone Number');
$bc->clear_query();
$bc->set_view_mode();
$bc->set_search_spec('Created By', "='$created_by'");
$bc->query();
if ($bc->first_record()) {
do {
my $val = $bc->get_field_value('Location');
say $val;
} while ($bc->next_record())
} else {
say 'Could not find the account';
}
} catch {
die 'Exception: ' . $app->get_last_error();
}
,做神奇的是Siebel::COM perl的模塊的東西。 如果您發佈了一個Excel腳本示例,我可能會幫助您將其更改爲Perl等效項。