I have tried to achieve this with Excel-DNA, but got lost. Now, I am trying to do this with XLW and hope to find a way.
Is there any way I can access the properties of a cell ?
Assuming there isn't a straight forward way to do this, I wanted to work around it. I tried to use C++/CLI approach, by using the Interop::Excel PIA, by using Workbook^, WorkSheet^ and Range^ objects and referring to the Hidden property of the Range class. Here is the code snippet:
- Code: Select all
xlw::XlfOper rngSourceRef = xlw::XlfServices.Commands.InputReference("Select the source range", "Select Source Range");
xlw::XlfOper rngDestCell = xlw::XlfServices.Commands.InputReference("Select the destination range", "Select Destination Range");
To do this I should be able to extract the workbook name and worksheet name from rngDestCell as this may be on a different workbook/worksheet. Therefore I need to be sure that I would be writing to the correct workbook/worksheet. I am not sure how I should go about obtaining the workbook and worksheet names and also the range address. In C# and VB I used the Range.Address(External:=true) property which returns the address along with workbook/worksheet names.
So is there a way to get the hidden property of cells from the rngDestCell ? If not is there a way I can get the workbook/worksheet names and the range address in "A1:A10" style ?