我能够在ABAP中使用OLE2添加过滤器,并且我的excel文件已成功创建。问题是过滤器不起作用 - 我可以看到附加到字段列的过滤器,但我无法单击。
DATA: go_application TYPE ole2_object,
go_column TYPE ole2_object,
CALL METHOD OF go_application 'Columns' = go_column.
CALL METHOD OF go_column 'AutoFit'.
SET PROPERTY OF go_column 'AutoFilter' = 1.
CALL METHOD OF go_sheet 'Protect'
EXPORTING
#1 = 'pass' " Password
#2 = 1 " Protect Drawing Objects
#3 = 1 " Protect Contents
#4 = 1 " Protect Scenarios
#5 = 0
#6 = 0
#7 = 0
#8 = 0
#9 = 0
#10 = 0
#11 = 0
#12 = 0
#13 = 0
#14 = 0
#15 = 1.
#15 放置过滤器的地方。 如果它对您有用,请给我反馈