0
$\begingroup$

I have an excel file with two sheets Sheet1 and Sheet2.

In 'Sheet1'!C14 I have a formula =E5+Sheet2!F13+G10.

I open this workbook and run the following commands in WL:

Needs["NETLink`"];
InstallNET[];    
excelApplication=GetActiveCOMObject["Excel.Application"];
range=excelApplication@Range["C14"];
range@Precedents[]@Address[]

Which produces:

"\$E\$5,\$G\$10"

But how do I get it also print the reference Sheet2!F13 also from the other sheet?

$\endgroup$
1
  • 2
    $\begingroup$ More about Excel than Mathematica, but... unfortunately the Excel object model does not provide an easy way to trace cross-sheet precedents. I haven't seen an easy work-around but an example of a hard one involving programmatic UI gestures can be found here. $\endgroup$
    – WReach
    Jul 6, 2022 at 23:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.