想要的:DXL代码可将OLE对象导出到Excel并指定"Placement"范围 [英] Wanted: DXL code to export OLE object to Excel and specify "Placement" parameter

查看:78
本文介绍了想要的:DXL代码可将OLE对象导出到Excel并指定"Placement"范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有可用的DXL代码将DOORS模块导出到Excel,包括调整图片大小并将它们放置在所需的单元格上.(对 GalacticSolutions脚本的略作修改的版本).据我所知,默认导出将应用参数移动但不随单元格调整大小".我想指定随单元移动并调整大小".导出后使用Excel VB宏很容易做到这一点,但我想避免这一步.我希望有一些 Oleput()字符串可以做到这一点,但无法弄清楚.

I have working DXL code to export a DOORS module to Excel, including sizing pictures and placing them over the desired cell. (Slightly modified version of GalacticSolutions script ). The default export so far as I can tell applies the parameter "Move but do not size with cell." I'd like to specify "Move and size with cell." This is easy enough to do with an Excel VB macro after the export, but I'd like to avoid that step. I'm hoping there's some Oleput() string that will do this, but can't figure it out.

推荐答案

我今天刚刚完成了这个工作.在脚本中,我在"Excel VBA属性"部分下添加了一个新常量.

I just worked through this today. In the script, I added a new constant under the Excel VBA Properties section.

const string cExcelPropertyPlacement = "Placement"

创建了一个新的小子程序:

Created a new little subroutine:

void excelShapeRangePlacement( OleAutoObj objExcelShapeRange, int OlePlacement ) {
   oleResult( olePut( objExcelShapeRange, cExcelPropertyPlacement, OlePlacement ) )
}

然后将新例程称为"excelSizeShape"子例程的结尾.

Then called the new routine a the end of the "excelSizeShape" subroutine.

// values: 1-MoveandSize, 2-Move, 3-Freefloating

excelShapeRangePlacement( objExcelShapeRange, 1 )

这应该设置输出到Excel的OLE的值.

This should set the value for the OLEs output into Excel..

这篇关于想要的:DXL代码可将OLE对象导出到Excel并指定"Placement"范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆