I work with at form thats use dynamic sas in a front end excel solution. When tagattr formula i used with a if clause excel puts #Navn (danish) #NA in a correct code. See code exampel. If use of F2 without any changed correct formula has been used. The code is in danish because we use excel2016 in danish - and because autotranslation in xml with excel function length or upper return error i xml to excel. The english is [tagattr="format:#,##0 formula:if(length(RC[-4])>0,RC[-2]*RC[-3],0)"] ; Full danish code with tabulate= ; (danish excel syntax) gives error. It doesn't matter if tagattr is written in define or compute. The full code i want to use is tagattr="formula:hvis(længde(RC[-1])>0,j5*(Satser!B4/100),0)" so that the user make input (here cell=j5) and return the right values. "Sater!b4" is a reference to another worksheet. The code is correct, but in excel is #Navn/#NA shown. How can i show the results in var=testhvis with out the #Navn error? ods excel file="&udadhoc.\test_tagattr.xlsx";
proc report data=sashelp.class out=testcase ;
column sex height weight testudenhvis testhvis ;
define sex / group;
define height / analysis sum;
define weight / analysis sum;
define testudenhvis / computed style(column)=[tagattr="format:#,##0 formula:RC[-1]*RC[-2]"] ;
define testhvis / computed style(column)=[tagattr="format:#,##0 formula:hvis(længde(RC[-4])>0,RC[-2]*RC[-3],0)"] ;
rbreak after / summarize ;
run;
ods excel close; Sex Height Weight testudenhvis testhvis F 545,3 811 442.238 #NAVN? M 639,1 1089,5 696.299 #NAVN? 1184,4 1900,5 2.250.952 #NAVN?
... View more