Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我可以访问Excel在Perl中使用的一些库吗?_Excel_Perl_Vba_Siebel - Fatal编程技术网

我可以访问Excel在Perl中使用的一些库吗?

我可以访问Excel在Perl中使用的一些库吗?,excel,perl,vba,siebel,Excel,Perl,Vba,Siebel,我们在Excel中有几个宏。在excel中的引用中,有一个名为SiebelHtml类型库的文件或类似文件。当它包含在Excel中时,它会加载许多函数和类 比如说 sApp as SiebelApplication 当我包含库时编译。我在目录中找到了两个文件。它们是SiebelAX_Desktop_Integration.exe和SiebelAX_Desktop_Integration.inf 有人知道我是否可以在perl脚本中包含这些文件中的数据,这样我就可以编写与上述代码相当的perl代码了

我们在Excel中有几个宏。在excel中的引用中,有一个名为SiebelHtml类型库的文件或类似文件。当它包含在Excel中时,它会加载许多函数和类

比如说

sApp as SiebelApplication
当我包含库时编译。我在目录中找到了两个文件。它们是SiebelAX_Desktop_Integration.exe和SiebelAX_Desktop_Integration.inf


有人知道我是否可以在perl脚本中包含这些文件中的数据,这样我就可以编写与上述代码相当的perl代码了。我对VBA不太熟悉,也不明白引擎盖下到底发生了什么?

我认为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();
}
发挥魔力的是perl模块。 如果您发布一个Excel脚本的示例,我可能能够帮助您将其更改为Perl等效版本