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的更多相关文章
随机推荐
- mysqli字符编码
mysqli 字符编码: 汉字编码: 1.gbk 最久的编码格式,不能写繁体: 2.国内的gb2312: 3.国际的标准:utf-8; 查看数据库的字符编码: show variables like ...
- Scrapy学习篇(十二)之设置随机IP代理(IPProxy)
当我们需要大量的爬取网站信息时,除了切换User-Agent之外,另外一个重要的方式就是设置IP代理,以防止我们的爬虫被拒绝,下面我们就来演示scrapy如何设置随机IPProxy. 设置随机IPPr ...
- sas data infile 语句选项
1)FIRSTOBS=N,从第N行开始读取数据2)OBS=M,到第M行结束数据读取3)MISSOVER:当一行数据读完的时候,不要转到下一行,而是为其余的变量分配缺失值4)TRUNCOVER:变量读取 ...
- 高性能mysql 第五章 索引部分总结
高性能索引 1.索引基础:索引的作用类似'目录'帮助Query来快速定位数据行. 1.1索引类型: 1.1.1 b-tree索引 b-tree(balance tree)索引:使用平衡树(非平衡二叉树 ...
- linux6下源码安装mysql5.6
概述:CentOS 6.4下通过yum安装的MySQL是5.1版的,比较老,所以就想通过源代码安装高版本的5.6.14.正文:一:卸载旧版本使用下面的命令检查是否安装有MySQL Serverrpm ...
- text-transform CSS
text-transform 控制文本的大小写(只对英文起作用,对汉字无效) Example: <p class="p1">This is an HI Element ...
- JAVA方法参数传递
package demo.methodparamDemo; public class MethodParamsDemo { public static void main(String[] args) ...
- 【Python】启动迅雷下载
import subprocess import base64 thunder_path = 'E:\Thunder\Program\Thunder.exe' def Url2Thunder(url) ...
- springboot 启动脚本
#!/bin/bash cd `` data_dir=`pwd` JAVA_HOME=/usr/local/jdk1..0_92 logs_dir=$data_dir/logs if [ ! -d $ ...
- python open函数的坑
python的open函数用来打开文件,但是在打开windows下文件时候会出错 f = open("e:\python_learn\test.txt", "r" ...