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++中宽字符类型(wchar_t)的编码

    转载自: http://www.ituring.com.cn/article/111027 问题的起因是和一个朋友讨论不同编码的转换问题,说到了wchar_t的类型,朋友的看法是,wchar_t的编码 ...

  2. 学习 MeteoInfo二次开发教程(一)

    来自气象家园:http://bbs.06climate.com/forum.php?mod=viewthread&tid=6631 按照教程,没有太大问题,有些是对c#操作不熟悉导致. 1.添 ...

  3. java的环境配置

    java的安装 1,进入官网  https://www.oracle.com/index.html 2.Menu -> Downloads -> java ->  all Java ...

  4. android 开发 View _11_ xml动画

    请大家尊重原创者版权,转载请标明出处:http://blog.csdn.net/harvic880925/article/details/39996643 谢谢! 一.概述 Android的anima ...

  5. 与引导文件系统/vmfs/devices..的备用设备之间的连接已丢失,主机配置更改将不会保存到持久存储中

    Cisco UCS 刀片服务器与NETAPP存储 1.异常问题描述: 2.可能原因:存储链路异常     比如断电恢复.光纤线本身的问题.模块的问题.环境温度的问题.bug之类的都有可能 3.处理: ...

  6. c# JSON格式转对象

    using Newtonsoft.Json; List<string> ChapterIdList = JsonConvert.DeserializeObject<List<s ...

  7. 基于windows平台搭建elasticsearch

    部署准备 elasticsearch-6.0.1.zip--https://www.elastic.co/downloads/elasticsearch elasticsearch-head-mast ...

  8. 更改mysql 和jinkins目录

    更改MySQL数据目录 1.修改my.cnf,注销原datadir,增加新的数据目录 #datadir=/var/lib/mysqldatadir=/mysql-data/mysql 2.修改启动脚本 ...

  9. springboot maven 部署

    1.在pom.xml文件中配置tomcat插件 <build> <plugins> <plugin> <groupId>org.springframew ...

  10. 解决no module named ipykernel_launcher

    解决no module named ipykernel_launcher 最近开hydrogen的时候,提示no module named ipykernel_launcher. 记得以前解决过这个问 ...