计算单元格的值

  1. func (f *File) CalcCellValue(sheet, cell string) (result string, err error)

根据给定的工作表名(大小写敏感)和单元格坐标计算包含公式单元格的值。该方法目前正在开发中,尚未支持数组函数、表格函数和其他部分函数。

支持的函数列表如下:

  1. ABS
  2. ACCRINT
  3. ACCRINTM
  4. ACOS
  5. ACOSH
  6. ACOT
  7. ACOTH
  8. ADDRESS
  9. AMORDEGRC
  10. AMORLINC
  11. AND
  12. ARABIC
  13. ASIN
  14. ASINH
  15. ATAN
  16. ATAN2
  17. ATANH
  18. AVEDEV
  19. AVERAGE
  20. AVERAGEA
  21. AVERAGEIF
  22. BASE
  23. BESSELI
  24. BESSELJ
  25. BESSELK
  26. BESSELY
  27. BIN2DEC
  28. BIN2HEX
  29. BIN2OCT
  30. BITAND
  31. BITLSHIFT
  32. BITOR
  33. BITRSHIFT
  34. BITXOR
  35. CEILING
  36. CEILING.MATH
  37. CEILING.PRECISE
  38. CHAR
  39. CHIDIST
  40. CHOOSE
  41. CLEAN
  42. CODE
  43. COLUMN
  44. COLUMNS
  45. COMBIN
  46. COMBINA
  47. COMPLEX
  48. CONCAT
  49. CONCATENATE
  50. CONFIDENCE
  51. CONFIDENCE.NORM
  52. COS
  53. COSH
  54. COT
  55. COTH
  56. COUNT
  57. COUNTA
  58. COUNTBLANK
  59. COUNTIF
  60. COUNTIFS
  61. COUPDAYBS
  62. COUPDAYS
  63. COUPDAYSNC
  64. COUPNCD
  65. COUPNUM
  66. COUPPCD
  67. CSC
  68. CSCH
  69. CUMIPMT
  70. CUMPRINC
  71. DATE
  72. DATEDIF
  73. DATEVALUE
  74. DAY
  75. DAYS
  76. DB
  77. DDB
  78. DEC2BIN
  79. DEC2HEX
  80. DEC2OCT
  81. DECIMAL
  82. DEGREES
  83. DELTA
  84. DEVSQ
  85. DISC
  86. DOLLARDE
  87. DOLLARFR
  88. DURATION
  89. EFFECT
  90. ENCODEURL
  91. ERF
  92. ERF.PRECISE
  93. ERFC
  94. ERFC.PRECISE
  95. EVEN
  96. EXACT
  97. EXP
  98. FACT
  99. FACTDOUBLE
  100. FALSE
  101. FIND
  102. FINDB
  103. FISHER
  104. FISHERINV
  105. FIXED
  106. FLOOR
  107. FLOOR.MATH
  108. FLOOR.PRECISE
  109. FV
  110. FVSCHEDULE
  111. GAMMA
  112. GAMMALN
  113. GCD
  114. GEOMEAN
  115. GESTEP
  116. HARMEAN
  117. HEX2BIN
  118. HEX2DEC
  119. HEX2OCT
  120. HLOOKUP
  121. IF
  122. IFERROR
  123. IFNA
  124. IFS
  125. IMABS
  126. IMAGINARY
  127. IMARGUMENT
  128. IMCONJUGATE
  129. IMCOS
  130. IMCOSH
  131. IMCOT
  132. IMCSC
  133. IMCSCH
  134. IMDIV
  135. IMEXP
  136. IMLN
  137. IMLOG10
  138. IMLOG2
  139. IMPOWER
  140. IMPRODUCT
  141. IMREAL
  142. IMSEC
  143. IMSECH
  144. IMSIN
  145. IMSINH
  146. IMSQRT
  147. IMSUB
  148. IMSUM
  149. IMTAN
  150. INDEX
  151. INT
  152. INTRATE
  153. IPMT
  154. IRR
  155. ISBLANK
  156. ISERR
  157. ISERROR
  158. ISEVEN
  159. ISFORMULA
  160. ISLOGICAL
  161. ISNA
  162. ISNONTEXT
  163. ISNUMBER
  164. ISODD
  165. ISREF
  166. ISTEXT
  167. ISO.CEILING
  168. ISOWEEKNUM
  169. ISPMT
  170. KURT
  171. LARGE
  172. LCM
  173. LEFT
  174. LEFTB
  175. LEN
  176. LENB
  177. LN
  178. LOG
  179. LOG10
  180. LOOKUP
  181. LOWER
  182. MATCH
  183. MAX
  184. MAXA
  185. MAXIFS
  186. MDETERM
  187. MDURATION
  188. MEDIAN
  189. MID
  190. MIDB
  191. MIN
  192. MINA
  193. MINIFS
  194. MINUTE
  195. MIRR
  196. MOD
  197. MONTH
  198. MROUND
  199. MULTINOMIAL
  200. MUNIT
  201. N
  202. NA
  203. NOMINAL
  204. NORM.DIST
  205. NORMDIST
  206. NORM.INV
  207. NORMINV
  208. NORM.S.DIST
  209. NORMSDIST
  210. NORM.S.INV
  211. NORMSINV
  212. NOT
  213. NOW
  214. NPER
  215. NPV
  216. OCT2BIN
  217. OCT2DEC
  218. OCT2HEX
  219. ODD
  220. ODDFPRICE
  221. OR
  222. PDURATION
  223. PERCENTILE.EXC
  224. PERCENTILE.INC
  225. PERCENTILE
  226. PERCENTRANK.EXC
  227. PERCENTRANK.INC
  228. PERCENTRANK
  229. PERMUT
  230. PERMUTATIONA
  231. PI
  232. PMT
  233. POISSON.DIST
  234. POISSON
  235. POWER
  236. PPMT
  237. PRICE
  238. PRICEDISC
  239. PRICEMAT
  240. PRODUCT
  241. PROPER
  242. PV
  243. QUARTILE
  244. QUARTILE.EXC
  245. QUARTILE.INC
  246. QUOTIENT
  247. RADIANS
  248. RAND
  249. RANDBETWEEN
  250. RANK
  251. RANK.EQ
  252. RATE
  253. RECEIVED
  254. REPLACE
  255. REPLACEB
  256. REPT
  257. RIGHT
  258. RIGHTB
  259. ROMAN
  260. ROUND
  261. ROUNDDOWN
  262. ROUNDUP
  263. ROW
  264. ROWS
  265. RRI
  266. SEC
  267. SECH
  268. SHEET
  269. SHEETS
  270. SIGN
  271. SIN
  272. SINH
  273. SKEW
  274. SLN
  275. SMALL
  276. SQRT
  277. SQRTPI
  278. STANDARDIZE
  279. STDEV
  280. STDEV.P
  281. STDEV.S
  282. STDEVA
  283. STDEVP
  284. SUBSTITUTE
  285. SUM
  286. SUMIF
  287. SUMSQ
  288. SWITCH
  289. SYD
  290. T
  291. TAN
  292. TANH
  293. TBILLEQ
  294. TBILLPRICE
  295. TBILLYIELD
  296. TEXTJOIN
  297. TIME
  298. TODAY
  299. TRANSPOSE
  300. TRIM
  301. TRIMMEAN
  302. TRUE
  303. TRUNC
  304. UNICHAR
  305. UNICODE
  306. UPPER
  307. VALUE
  308. VAR
  309. VAR.P
  310. VAR.S
  311. VARA
  312. VARP
  313. VARPA
  314. VDB
  315. VLOOKUP
  316. WEEKDAY
  317. WEIBULL
  318. WEIBULL.DIST
  319. XIRR
  320. XNPV
  321. XOR
  322. YEAR
  323. YEARFRAC
  324. YIELD
  325. YIELDDISC
  326. YIELDMAT
  327. Z.TEST
  328. ZTEST