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的更多相关文章
随机推荐
- plot
scatter import pandas as pd df_train=pd.read_excel(r"C:\Users\Liugengxin\Desktop\回归.xlsx") ...
- 深入理解Spring Boot属性配置文件
我们在开发Spring Boot应用时,通常同一套程序会被应用和安装到几个不同的环境,比如:开发.测试.生产等.其中每个环境的数据库地址.服务器端口等等配置都会不同,如果在为不同环境打包时都要频繁修改 ...
- 双心一键获取winsxs的写入权限,解决VC运行库安装error1935错误
@Echo offtitle 双心一键获取winsxs的写入权限,解决VC运行库安装error1935等错误set path=%path%;%~dp0setlocal EnableDelayedExp ...
- C# 栈 、队列的概念
栈: 也是System.Collections下的数据结构 存储依然是Object类型的对象 Stack 名字 = new Stack(); Count:实际拥有的元素个数 栈的释放顺序是先进后出(后 ...
- Oracle 学习笔记 (七)
一.数据库的启动 启动数据库的三个阶段: nomount, mount,open mount 阶段:. 1.读参数文件 2.分配内存 3.启动后台进程 4.初始化部分v$视图 mount 阶段: 读参 ...
- http 文件上传协议图览
- vue 全局组件【原】
1.目录 2.内容 -Loading.vue <template> <div class="loading"> loading... </div> ...
- Maven项目中遇到的问题及其解决方案
Maven中pom报红 1.jdk版本是否符合要求? 2.maven的本地confg中的setting.xml中是否和要求的jdk版本一致? 3.maven本地仓库路径是否正确,即为自己的确定的仓库位 ...
- 记号一次更换IBM X3650M4主板后RAID无法启动的解决
https://wenku.baidu.com/view/9d503ef367ec102de2bd89d7.html 强烈感谢上面分享文档的大侠!! 1.更换主板后,linux系统,无法加载引导.需要 ...
- Could not find a package,configuration file provided by "G2O" ,G2OConfig.cmake,g2o-config.cmake
因为项目需要使用到g2o,所以自己从git上面clone下来, git clone https://github.com/RainerKuemmerle/g2o.git 然后: cd g2o mkdi ...