Solved! Go to solution

Change Excel links in Variable table



Does someone have experience in altering Excel links in the variable table using the API?


My issue is the following: we have an assembly driven by variable from an external Excel file. These links were made using an English version of excel ==> R1C1 (Row 1, Column 1) relation.


On an other system where Dutch Excel is installed the excel notation is R1K1 (Row = Rij in Dutch and Column = Kolom in Dutch)


Hence this translation issue, the Excel links in SE do not work if a Dutch Excel version is used. Since there are also other macro's based on the dutch Excel version, i need both versions of the SE assembly (Dutch and English links).


I was thinks of changing all links in the assembly from "RxCy" to "RxKy", but i'm looking for the functions as used in the Variable rule editor, where you can alter this manually.


Any ideas?

Accepted by topic author jchanterie
‎08-26-2015 04:32 AM

Re: Change Excel links in Variable table

Found where my problem was.


Simply have to use:

loVarFormula = objDimension.Formula
loVarFormulaNew = loVarFormula.Replace("C", "K")
objDimension.Formula = loVarFormulaNew


BUT, the trick lied in the fact that you have to execute the program on a machine having the Dutch Excel. If SE cannot find /solve the link to Excel cel, the Formula set fails.