AttachmentField (对象)
说明
AttachmentField 图片和附件字段的属性,修改属性之后需要 FieldDescriptor 调用Apply()方法使得修改生效。如果非图片和附件字段,无法设置相关属性
属性
浏览器环境示例
javascript
async function example() {
await instance.ready();
const app = instance.Application;
const field = await app.Sheets(1).FieldDescriptors("@图片和附件")
const prop = await field.Attachment
prop.DisplayStyle = "Pic"
prop.IsOnlyCameraUpload = false
field.Apply()
}
脚本编辑器 示例
javascript
function main(){
const field = Application.Sheets(1).FieldDescriptors("@图片和附件")
const prop = field.Attachment
prop.DisplayStyle = "Pic"
prop.IsOnlyCameraUpload = true
field.Apply()
}
main()