COUNTA.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. use PhpOffice\PhpSpreadsheet\Shared\Date;
  3. return [
  4. [
  5. 5,
  6. [-1, 0, 1, 2, 3],
  7. ],
  8. [
  9. 11,
  10. [
  11. // The index simulates a cell value
  12. '0.1.A' => Date::stringToExcel('1900-02-01'),
  13. '0.2.A' => 0,
  14. '0.3.A' => null,
  15. '0.4.A' => 1.2,
  16. '0.5.A' => '',
  17. '0.6.A' => 2.4,
  18. '0.7.A' => null,
  19. '0.8.A' => '',
  20. '0.9.A' => 3.6,
  21. '0.10.A' => null,
  22. '0.11.A' => '',
  23. '0.12.A' => 4.8,
  24. '0.13.A' => 'Not a numeric',
  25. '0.14.A' => 6,
  26. ],
  27. ],
  28. [
  29. 14,
  30. [
  31. // No index indicates arguments passed as literals rather than cell values
  32. // In this case, nuls are counted as well as numbers
  33. Date::stringToExcel('1900-02-01'),
  34. 0,
  35. null,
  36. 1.2,
  37. '',
  38. 2.4,
  39. null,
  40. '',
  41. 3.6,
  42. null,
  43. '',
  44. 4.8,
  45. 'Not a numeric',
  46. 6,
  47. ],
  48. ],
  49. ];