# 下面的行遍历 TIBCO Spotfire 表,获取列和列属性,其中之一是列的“计算表达式”属性
for tb in Document.Data.Tables:
for col in tb.Columns:
# initialize column variable
ces = ""
# get calculated expression and cast to string
try:
ces = col.Properties.CalculatedExpression.ToString()
exception:
ces="Error:Calculated Expression Not Read"
我事先知道一些计算表达式中有 unicode 字符(对此无能为力),所以我试图“捕捉”这些问题并简单地写出错误。
然后转到下一列。
但是,我继续收到以下错误,抱怨大于或等于符号:
System.Text.EncoderFallbackException:“ascii”编解码器无法在位置 174 编码字符“\u2264”