计算单元格的值

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

根据给定的工作表名和单元格坐标计算包含公式单元格的值。该方法目前正在开发中,尚未支持迭代计算、隐式交集、显式交集、数组函数、表格函数和其他部分函数。

支持的函数列表如下:

  1. ABS
  2. ACCRINT
  3. ACCRINTM
  4. ACOS
  5. ACOSH
  6. ACOT
  7. ACOTH
  8. ADDRESS
  9. AGGREGATE
  10. AMORDEGRC
  11. AMORLINC
  12. AND
  13. ARABIC
  14. ASIN
  15. ASINH
  16. ATAN
  17. ATAN2
  18. ATANH
  19. AVEDEV
  20. AVERAGE
  21. AVERAGEA
  22. AVERAGEIF
  23. AVERAGEIFS
  24. BASE
  25. BESSELI
  26. BESSELJ
  27. BESSELK
  28. BESSELY
  29. BETADIST
  30. BETA.DIST
  31. BETAINV
  32. BETA.INV
  33. BIN2DEC
  34. BIN2HEX
  35. BIN2OCT
  36. BINOMDIST
  37. BINOM.DIST
  38. BINOM.DIST.RANGE
  39. BINOM.INV
  40. BITAND
  41. BITLSHIFT
  42. BITOR
  43. BITRSHIFT
  44. BITXOR
  45. CEILING
  46. CEILING.MATH
  47. CEILING.PRECISE
  48. CHAR
  49. CHIDIST
  50. CHIINV
  51. CHITEST
  52. CHISQ.DIST
  53. CHISQ.DIST.RT
  54. CHISQ.INV
  55. CHISQ.INV.RT
  56. CHISQ.TEST
  57. CHOOSE
  58. CLEAN
  59. CODE
  60. COLUMN
  61. COLUMNS
  62. COMBIN
  63. COMBINA
  64. COMPLEX
  65. CONCAT
  66. CONCATENATE
  67. CONFIDENCE
  68. CONFIDENCE.NORM
  69. CONFIDENCE.T
  70. CONVERT
  71. CORREL
  72. COS
  73. COSH
  74. COT
  75. COTH
  76. COUNT
  77. COUNTA
  78. COUNTBLANK
  79. COUNTIF
  80. COUNTIFS
  81. COUPDAYBS
  82. COUPDAYS
  83. COUPDAYSNC
  84. COUPNCD
  85. COUPNUM
  86. COUPPCD
  87. COVAR
  88. COVARIANCE.P
  89. COVARIANCE.S
  90. CRITBINOM
  91. CSC
  92. CSCH
  93. CUMIPMT
  94. CUMPRINC
  95. DATE
  96. DATEDIF
  97. DATEVALUE
  98. DAVERAGE
  99. DAY
  100. DAYS
  101. DAYS360
  102. DB
  103. DCOUNT
  104. DCOUNTA
  105. DDB
  106. DEC2BIN
  107. DEC2HEX
  108. DEC2OCT
  109. DECIMAL
  110. DEGREES
  111. DELTA
  112. DEVSQ
  113. DGET
  114. DISC
  115. DMAX
  116. DMIN
  117. DOLLARDE
  118. DOLLARFR
  119. DPRODUCT
  120. DSTDEV
  121. DSTDEVP
  122. DSUM
  123. DURATION
  124. DVAR
  125. DVARP
  126. EFFECT
  127. EDATE
  128. ENCODEURL
  129. EOMONTH
  130. ERF
  131. ERF.PRECISE
  132. ERFC
  133. ERFC.PRECISE
  134. ERROR.TYPE
  135. EUROCONVERT
  136. EVEN
  137. EXACT
  138. EXP
  139. EXPON.DIST
  140. EXPONDIST
  141. FACT
  142. FACTDOUBLE
  143. FALSE
  144. F.DIST
  145. F.DIST.RT
  146. FDIST
  147. FIND
  148. FINDB
  149. F.INV
  150. F.INV.RT
  151. FINV
  152. FISHER
  153. FISHERINV
  154. FIXED
  155. FLOOR
  156. FLOOR.MATH
  157. FLOOR.PRECISE
  158. FORMULATEXT
  159. F.TEST
  160. FTEST
  161. FV
  162. FVSCHEDULE
  163. GAMMA
  164. GAMMA.DIST
  165. GAMMADIST
  166. GAMMA.INV
  167. GAMMAINV
  168. GAMMALN
  169. GAMMALN.PRECISE
  170. GAUSS
  171. GCD
  172. GEOMEAN
  173. GESTEP
  174. GROWTH
  175. HARMEAN
  176. HEX2BIN
  177. HEX2DEC
  178. HEX2OCT
  179. HLOOKUP
  180. HOUR
  181. HYPERLINK
  182. HYPGEOM.DIST
  183. HYPGEOMDIST
  184. IF
  185. IFERROR
  186. IFNA
  187. IFS
  188. IMABS
  189. IMAGINARY
  190. IMARGUMENT
  191. IMCONJUGATE
  192. IMCOS
  193. IMCOSH
  194. IMCOT
  195. IMCSC
  196. IMCSCH
  197. IMDIV
  198. IMEXP
  199. IMLN
  200. IMLOG10
  201. IMLOG2
  202. IMPOWER
  203. IMPRODUCT
  204. IMREAL
  205. IMSEC
  206. IMSECH
  207. IMSIN
  208. IMSINH
  209. IMSQRT
  210. IMSUB
  211. IMSUM
  212. IMTAN
  213. INDEX
  214. INDIRECT
  215. INT
  216. INTRATE
  217. IPMT
  218. IRR
  219. ISBLANK
  220. ISERR
  221. ISERROR
  222. ISEVEN
  223. ISFORMULA
  224. ISLOGICAL
  225. ISNA
  226. ISNONTEXT
  227. ISNUMBER
  228. ISODD
  229. ISREF
  230. ISTEXT
  231. ISO.CEILING
  232. ISOWEEKNUM
  233. ISPMT
  234. KURT
  235. LARGE
  236. LCM
  237. LEFT
  238. LEFTB
  239. LEN
  240. LENB
  241. LN
  242. LOG
  243. LOG10
  244. LOGINV
  245. LOGNORM.DIST
  246. LOGNORMDIST
  247. LOGNORM.INV
  248. LOOKUP
  249. LOWER
  250. MATCH
  251. MAX
  252. MAXA
  253. MAXIFS
  254. MDETERM
  255. MDURATION
  256. MEDIAN
  257. MID
  258. MIDB
  259. MIN
  260. MINA
  261. MINIFS
  262. MINUTE
  263. MINVERSE
  264. MIRR
  265. MMULT
  266. MOD
  267. MODE
  268. MODE.MULT
  269. MODE.SNGL
  270. MONTH
  271. MROUND
  272. MULTINOMIAL
  273. MUNIT
  274. N
  275. NA
  276. NEGBINOM.DIST
  277. NEGBINOMDIST
  278. NETWORKDAYS
  279. NETWORKDAYS.INTL
  280. NOMINAL
  281. NORM.DIST
  282. NORMDIST
  283. NORM.INV
  284. NORMINV
  285. NORM.S.DIST
  286. NORMSDIST
  287. NORM.S.INV
  288. NORMSINV
  289. NOT
  290. NOW
  291. NPER
  292. NPV
  293. OCT2BIN
  294. OCT2DEC
  295. OCT2HEX
  296. ODD
  297. ODDFPRICE
  298. OR
  299. PDURATION
  300. PEARSON
  301. PERCENTILE.EXC
  302. PERCENTILE.INC
  303. PERCENTILE
  304. PERCENTRANK.EXC
  305. PERCENTRANK.INC
  306. PERCENTRANK
  307. PERMUT
  308. PERMUTATIONA
  309. PHI
  310. PI
  311. PMT
  312. POISSON.DIST
  313. POISSON
  314. POWER
  315. PPMT
  316. PRICE
  317. PRICEDISC
  318. PRICEMAT
  319. PRODUCT
  320. PROPER
  321. PV
  322. QUARTILE
  323. QUARTILE.EXC
  324. QUARTILE.INC
  325. QUOTIENT
  326. RADIANS
  327. RAND
  328. RANDBETWEEN
  329. RANK
  330. RANK.EQ
  331. RATE
  332. RECEIVED
  333. REPLACE
  334. REPLACEB
  335. REPT
  336. RIGHT
  337. RIGHTB
  338. ROMAN
  339. ROUND
  340. ROUNDDOWN
  341. ROUNDUP
  342. ROW
  343. ROWS
  344. RRI
  345. RSQ
  346. SEC
  347. SECH
  348. SECOND
  349. SERIESSUM
  350. SHEET
  351. SHEETS
  352. SIGN
  353. SIN
  354. SINH
  355. SKEW
  356. SKEW.P
  357. SLN
  358. SLOPE
  359. SMALL
  360. SQRT
  361. SQRTPI
  362. STANDARDIZE
  363. STDEV
  364. STDEV.P
  365. STDEV.S
  366. STDEVA
  367. STDEVP
  368. STDEVPA
  369. STEYX
  370. SUBSTITUTE
  371. SUBTOTAL
  372. SUM
  373. SUMIF
  374. SUMIFS
  375. SUMPRODUCT
  376. SUMSQ
  377. SUMX2MY2
  378. SUMX2PY2
  379. SUMXMY2
  380. SWITCH
  381. SYD
  382. T
  383. TAN
  384. TANH
  385. TBILLEQ
  386. TBILLPRICE
  387. TBILLYIELD
  388. T.DIST
  389. T.DIST.2T
  390. T.DIST.RT
  391. TDIST
  392. TEXTJOIN
  393. TIME
  394. TIMEVALUE
  395. T.INV
  396. T.INV.2T
  397. TINV
  398. TODAY
  399. TRANSPOSE
  400. TREND
  401. TRIM
  402. TRIMMEAN
  403. TRUE
  404. TRUNC
  405. T.TEST
  406. TTEST
  407. TYPE
  408. UNICHAR
  409. UNICODE
  410. UPPER
  411. VALUE
  412. VAR
  413. VAR.P
  414. VAR.S
  415. VARA
  416. VARP
  417. VARPA
  418. VDB
  419. VLOOKUP
  420. WEEKDAY
  421. WEEKNUM
  422. WEIBULL
  423. WEIBULL.DIST
  424. WORKDAY
  425. WORKDAY.INTL
  426. XIRR
  427. XLOOKUP
  428. XNPV
  429. XOR
  430. YEAR
  431. YEARFRAC
  432. YIELD
  433. YIELDDISC
  434. YIELDMAT
  435. Z.TEST
  436. ZTEST