AX_SysExcel
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的更多相关文章
随机推荐
- Spring Boot之执行器端点(Actuator Endpoint)实现剖析
整体实现思路是将端点(Endpoint)适配委托给MVC层策略端点(MvcEndpoint),再通过端点MVC适配器(EndpointMvcAdapter)将端点暴露为HTTP请求方式的MVC端点,最 ...
- Web jsp开发学习——网上直播聊天室的简单开发
整个界面为chat.jsp: 如果用户没有登录,就不能进行聊天. 为将发言的句子传到页面上,要设置一个<iframe></iframe>虚拟框架,将allmessage.jsp ...
- NodeJs中类定义及类使用
1.首先定义类Point,文件名为point.class.js: // 定义类 class Point { //构造函数 constructor(x, y) { this.x = x;//类中变量 t ...
- 利用飞儿云PHP框架自带的DNSPOD库做DDNS动态域名解析
取得FiradioPHP git clone https://github.com/firadio/firadiophp.git 保存到/config/dnspod1.php <?php ret ...
- cookie and sesssion
会话(Session)跟踪是Web程序中常用的技术,用来跟踪用户的整个会话.常用的会话跟踪技术是Cookie与Session.Cookie通过在客户端记录信息确定用户身份,Session通过在服务器端 ...
- 学习 MeteoInfo二次开发教程(一)
来自气象家园:http://bbs.06climate.com/forum.php?mod=viewthread&tid=6631 按照教程,没有太大问题,有些是对c#操作不熟悉导致. 1.添 ...
- SSO 单点登录
一.单系统登录机制 1.http无状态协议 web应用采用browser/server架构,http作为通信协议.http是无状态协议,浏览器的每一次请求,服务器会独立处理,不与之前或之后的请求产生关 ...
- Object.create() vs new SomeFunction() in javascript
Object.create builds an object that inherits directly from the one passed as its first argument. Wit ...
- (vue.js)element ui 表单重置
el-form需要接收一个model,并且需要配合el-form-item一起使用,并且在el-form-item上绑定prop属性,resetField方法才能好使. <el-form :mo ...
- 如何编写Window服务程序(C# )
虚拟需求:编写一个Window服务,并注册到操作系统的服务里.让他隔30秒运行一下(写当前日期到一个文本里) 步骤: 创建一个Window 窗体应用程序项目(Greatwall.Mes.Windows ...