Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //males mode on
- $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName);
- $huruf = array(
- 'b',
- 'c',
- 'd'
- ); //maaf lagi males
- $max = 20;
- $n20 = 0;
- $res = array();
- foreach ($huruf as $n) {
- for ($i = 1; $i <= $max; $i++) {
- $cell = strtoupper($n . $i);
- $col = $spreadsheet->getActiveSheet()->getStyle($cell)->getFont()->getColor()->getRGB();
- $txt = $spreadsheet->getActiveSheet()->getCell($cell)->getValue();
- if ($col == 'FF3333') {
- if (!isset($res[$txt]))
- $res[$txt] = 0;
- $res[$txt]++;
- }
- //FF3333
- }
- }
- print_r($res);
Advertisement
Add Comment
Please, Sign In to add comment