计算单元格的值

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