具有以下工作公式
private static void encode(String sourceFile) throws FileNotFoundException, IOException, EXIOptionsException, TransmogrifierException {
String sCurrentLine=null;
StringBuilder sb = new StringBuilder();
try (BufferedReader br = new BufferedReader(new FileReader(sourceFile))){
while ((sCurrentLine = br.readLine()) != null) {
sb.append(sCurrentLine);
}
}
String sb1= sb.toString();
System.out.println("xml to string:"+sb1+"\n");
OutputStream out =null;
//this code from nagasena
GrammarCache grammarCache;
Transmogrifier transmogrifier = new Transmogrifier();
grammarCache = new GrammarCache(GrammarOptions.DEFAULT_OPTIONS);
transmogrifier.setGrammarCache(grammarCache);
transmogrifier.setOutputStream(out);
//passing the string as input
transmogrifier.encode(new InputSource(sb1));
System.out.println("Check2 : String to EXI conversion"+ out +"\n");
我正在尝试用位于C3中的变量替换表1的3个硬编码引用。我的尝试如下使用间接(我以前在单个条件语句中使用过这个但不在多个条件语句中使用过它):
=SUMIFS('1'!$U$2:$U$32,'1'!$Z$2:$Z$32,{1007,1008},'1'!$AB$2:$AB$32,"*"&March!B5&"")
然而,这会产生错误。
感谢一些帮助,指出我正确的方向。
答案 0 :(得分:2)
您还没有关闭间接函数中的字符串:
=SUMIFS(INDIRECT("'"&$C3&"'!$U$2:$U$32"),INDIRECT("'"&$C3&"'!$Z$2:$Z$32"),{1007,1008},INDIRECT("'"&$C3&"'!$AB$2:$AB$32"),"*"&March!B5&"")