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. react使用ant-design组件库

    新建项目并引入组件 1,全局安装脚手架 npm install -g create-react-app 2,新建项目 create-react-app reactantd 3,安装组件 npm ins ...

  2. Vue 封装js 并 引用

    /封装模块化文件 新建的.js文件 var storage = { set(key, value) { localStorage.setItem(key, JSON.stringify(value)) ...

  3. js开发相关

    获取url中的参数 (function ($) { $.getUrlParam = function (name) { var reg = new RegExp("(^|&)&quo ...

  4. spark java.lang.OutOfMemoryError: unable to create new native thread

    最近迁移集群,在hadoop-2.8.4 的yarn上跑 spark 程序 报了以下错误 java.lang.OutOfMemoryError: unable to create new native ...

  5. java 调用 python 的几种方法整理

    参考:   https://blog.csdn.net/secondlieutenant/article/details/79000265

  6. kudu导入文件(基于impala)

    kudu是cloudera开源的运行在hadoop平台上的列式存储系统,拥有Hadoop生态系统应用的常见技术特性,运行在一般的商用硬件上,支持水平扩展,高可用,集成impala后,支持标准sql语句 ...

  7. leetcode46

    public class Solution { public IList<IList<int>> Permute(int[] nums) { IList<IList< ...

  8. Flannel网络插件配置

    # ps -ef|grep docker|grep bip FLANNEL_OPTIONS="-ip-masq=true" -ip-masq=true 这个参数的目的是让flann ...

  9. Linux安装配置JDK1.7

    1  在/usr/local   文件夹下新建一个文件夹software ,将JDK放到此文件夹中 并在此文件夹下解压执行命令  tar  zxvf  jdk-8u144-linux-x64.tar. ...

  10. a链接的onclick与js中的return false

    在学习<javascript基础教程>第八版时,有一个小细节开始不是很明白,查了一些资料后,理了一下思路. 例子的html代码: <!DOCTYPE html> <htm ...