I'm working on a bit of custom DXL that includes some exporting to Excel and setting various Excel properties on the output and I'm stumped. I'm trying to indent within a cell and so far I've not been able to get it to work. But I've been able to set other properties without issue.
Here's how I tried it with "olePut" ( trying to mimic the VBA that is recorded when I right-click a cell and select Format Cells and change the indent property on the alignment tab):
s_result = olePut ( objExcelSelection, "HorizontalAlignment", xlLeft )
print "HorizontalAlignment: " s_result "\n"
s_result = olePut ( objExcelSelection, "IndentLevel", 1 )
print "IndentLevel: " s_result "\n"
The "HorizontalAlignment" part works, but the "IndentLevel" does not.
Here's how I tried it with "oleMethod" (trying to mimic the VBA that is recorded when I use the toolbar increase indent button on a cell):
put ( objArgs, 1 )
s_result = oleMethod ( objExcelRange, "InsertIndent", objArgs )
print "InsertIndent: " s_result "\n"
It doesn't work, but if I try to use other methods with oleMethod they work.
I've also tried each of these with both ranges and selections and had no luck, and I've tried using both bits of code together with no luck.
Does anyone have any idea where I'm going wrong?