void KTL_CPeng_ImportCustStamp() 

    str                 file; 
    FileNameFilter      filter = ["@SYS57521",'*.xlsx', "@SYS101541",'*.xls']; 
    COMVariant          COMVariant1; 
    SysExcelApplication app; 
    SysExcelWorkbooks   Workbooks; 
    SysExcelWorkbook    Workbook; 
    SysExcelWorksheets  Worksheets; 
    SysExcelWorksheet   Worksheet; 
    SysExcelCells       Cells; 
    SysExcelCell        RCell1, RCell2, RCell3,RCell4,RCell5,RCell6,RCell7, RCell8; 
    int                 i, j; 
    #excel 
    ; 
 
    try 
    { 
        ttsbegin; 
        file        = Winapi::getOpenFileName(, filter, '', "Open Excel Files"); 
        app         = SysExcelApplication::construct(); 
        Workbooks   = app.Workbooks(); 
        COMVariant1 = new COMVariant(); 
        COMVariant1.bStr(file); 
        Workbook    = Workbooks.Add(COMVariant1); 
        Worksheets  = Workbook.worksheets(); 
        Worksheet = Worksheets.itemFromName("sheet1"); 
        //Worksheet   = worksheets.itemFromNum(1); 
        Cells       = Worksheet.Cells(); 
 
        i = ; // first line is a title, start line 2 
        RCell1 = Cells.Item(i, ); 
        RCell2 = Cells.Item(i, ); 
        RCell3 = Cells.Item(i, ); 
        RCell4 = Cells.Item(i, ); 
        RCell5 = Cells.Item(i, ); 
        RCell6 = Cells.Item(i, ); 
        RCell7 = Cells.Item(i, ); 
        RCell8 = Cells.Item(i, ); 
 
        while (RCell1.value().bStr() != "") 
        { 
            print Cells.item(i, ).value().bStr(); 
            // add code 
            i++; 
            RCell1 = Cells.item(i, ); 
            RCell2 = Cells.Item(i, ); 
            RCell3 = Cells.Item(i, ); 
            RCell4 = Cells.Item(i, ); 
            RCell5 = Cells.Item(i, ); 
            RCell6 = Cells.Item(i, ); 
            RCell7 = Cells.Item(i, ); 
            RCell8 = Cells.Item(i, ); 
        } 
        ttscommit; 
 
        info(strfmt("%1 %2 %3", "Update Complete", i-, curext())); 
    } 
    catch 
    { 
        info("Nothing Uploaded"); 
    } 
}

AX_SysExcel的更多相关文章

随机推荐

  1. 猴子选大王的c#实现

    原文地址:猴子选大王的c#实现作者:余文 今天被问到了猴子选大王的意思,题目大意就是说有n只猴子围坐成一个圈,按顺时针方向从1到n编号.然后从1号猴子开始沿顺时针方向从1开始报数,报到m的猴子出局,再 ...

  2. C++Primer第五版——习题答案详解(五)

    习题答案目录:https://www.cnblogs.com/Mered1th/p/10485695.html 第6章 函数 练习6.4 #include<iostream> using ...

  3. jmeter单sql语句测试

    前提:在进行接口或者性能测试时需要用到数据库连接,此文讲解简单的单sql语句执行 步骤1:启动jmeter,新建一个测试计划,新建一个Thread(此处不作详细说明) 步骤2:再新建一个JDBC Co ...

  4. HashMap的实现原理,以及在JDK1.7和1.8的区别

    1.JDK1.7 HashMap是Java中大家最常用的一个map实现类,其为键值对也就是key-value的形式.他的数据结构则是采用的位桶和链表相结合的形式完成了,即拉链法.具体如下图所示: Ha ...

  5. thymeleaf注入springboot

    thymeleaf注入springboot需要引入jar: <dependency> <groupId>org.springframework.boot</groupId ...

  6. Beta冲刺——第三天

    beta冲刺:第三天 各个成员今日完成的任务 成员 冯晓.马思远 彭辉.王爽 吴琼.郝延婷 今日完成任务 ·管理员管理功能模块下角色管理功能的完善测试 ·角色和权限部分代码规范 ·博客撰写 ·后台系统 ...

  7. texmaker报错:could not start command 解决

    我当时文件命名加了邮箱,引入特殊字符@,然后就报错了

  8. 微商城分享 包括app分享 微信分享

    <template> <div class="spr"> <img src="../../assets/images/activity/sh ...

  9. ucore-lab1-练习5report

    实验5--实现函数调用堆栈跟踪函数 需要完成kdebug.c中函数print_stackframe的实现,可以通过函数print_stackframe来跟踪函数调用堆栈中记录的返回地址. 一.函数堆栈 ...

  10. FortiGate日志中session clash

    1.出现于:FortiGate v5.0和v5.2 2.出现原因 Session clash messages appear in the logs when a new session is cre ...