I am currently working on a application that is able to write Excel files. I have written a small class that is able to communicate with Excel using a wxAutomationObject.
However, I am not able to send all the VBA commands that I want to. For example, I want to add bottom border on cell. The VBA code for this is:
Code: Select all
ActiveCell.Borders(xlEdgeBottom).LineStyle = xlContinuous
Code: Select all
// excelObj is a wxAutomationObject with an excel instance
excelObj.PutProperty("ActiveCell.Borders(xlEdgeBottom).LineStyle", "1");
This code doesn't do anything, the cells bottom border isn't changed at all. The strange thing is that other VBA commands work just fine (bordering all cell's edges), like this one:
Code: Select all
excelObj.PutProperty("ActiveCell.Borders.LineStyle", "1");
Can anyone tell me what I am doing wrong with the border command?
Thanks,